From a6b073ece24f18a628ef935008bab056e4cdea85 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 7 Nov 2023 21:56:21 +0000 Subject: [PATCH 1/2] fix!: added required annotations docs: updated comments explaining if a field is optional or required CreateKeyRequest.display_name and PrivatePasswordLeakVerification.lookup_hash_prefix are now required. PiperOrigin-RevId: 580254588 Source-Link: https://github.com/googleapis/googleapis/commit/22df66c961f2468c7f09742c658221274e63ea03 Source-Link: https://github.com/googleapis/googleapis-gen/commit/488324dfc157101c764b110f58d945bcc28600be Copy-Tag: eyJwIjoiUmVjYXB0Y2hhRW50ZXJwcmlzZS8uT3dsQm90LnlhbWwiLCJoIjoiNDg4MzI0ZGZjMTU3MTAxYzc2NGIxMTBmNThkOTQ1YmNjMjg2MDBiZSJ9 --- .../V1/Recaptchaenterprise.php | Bin 0 -> 20924 bytes .../V1/AccountDefenderAssessment.php | 67 + .../AccountDefenderLabel.php | 82 + .../V1/AccountVerificationInfo.php | 182 +++ .../V1/AccountVerificationInfo/Result.php | 123 ++ .../V1/AndroidKeySettings.php | 147 ++ .../V1/AnnotateAssessmentRequest.php | 269 ++++ .../AnnotateAssessmentRequest/Annotation.php | 82 + .../V1/AnnotateAssessmentRequest/Reason.php | 165 ++ .../V1/AnnotateAssessmentResponse.php | 33 + .../V1/AppleDeveloperId.php | 147 ++ .../RecaptchaEnterprise/V1/Assessment.php | 495 ++++++ .../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 | 545 +++++++ .../RecaptchaEnterprise/V1/FirewallAction.php | 223 +++ .../V1/FirewallAction/AllowAction.php | 36 + .../V1/FirewallAction/BlockAction.php | 37 + .../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 ++ .../Cloud/RecaptchaEnterprise/V1/Key.php | 384 +++++ .../V1/ListFirewallPoliciesRequest.php | 162 ++ .../V1/ListFirewallPoliciesResponse.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/PrivatePasswordLeakVerification.php | 201 +++ .../V1/RelatedAccountGroup.php | 71 + .../V1/RelatedAccountGroupMembership.php | 113 ++ .../V1/RetrieveLegacySecretKeyRequest.php | 86 ++ .../V1/RetrieveLegacySecretKeyResponse.php | 80 + .../RecaptchaEnterprise/V1/RiskAnalysis.php | 147 ++ .../V1/RiskAnalysis/ClassificationReason.php | 101 ++ .../V1/ScoreDistribution.php | 75 + .../RecaptchaEnterprise/V1/ScoreMetrics.php | 115 ++ ...hRelatedAccountGroupMembershipsRequest.php | 233 +++ ...RelatedAccountGroupMembershipsResponse.php | 105 ++ .../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 ++ .../RecaptchaEnterprise/V1/WafSettings.php | 102 ++ .../V1/WafSettings/WafFeature.php | 81 + .../V1/WafSettings/WafService.php | 64 + .../RecaptchaEnterprise/V1/WebKeySettings.php | 227 +++ .../ChallengeSecurityPreference.php | 72 + .../V1/WebKeySettings/IntegrationType.php | 76 + .../annotate_assessment.php | 73 + .../create_assessment.php | 70 + .../create_firewall_policy.php | 75 + .../create_key.php | 73 + .../delete_firewall_policy.php | 68 + .../delete_key.php | 65 + .../get_firewall_policy.php | 70 + .../get_key.php | 67 + .../get_metrics.php | 68 + .../list_firewall_policies.php | 72 + .../list_keys.php | 72 + ...list_related_account_group_memberships.php | 75 + .../list_related_account_groups.php | 72 + .../migrate_key.php | 72 + .../retrieve_legacy_secret_key.php | 69 + ...arch_related_account_group_memberships.php | 78 + .../update_firewall_policy.php | 56 + .../update_key.php | 69 + .../RecaptchaEnterpriseServiceClient.php | 792 ++++++++++ .../RecaptchaEnterpriseServiceGapicClient.php | 1371 +++++++++++++++++ .../V1/RecaptchaEnterpriseServiceClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 108 ++ ...tcha_enterprise_service_client_config.json | 122 ++ ...a_enterprise_service_descriptor_config.php | 274 ++++ ..._enterprise_service_rest_client_config.php | 217 +++ .../RecaptchaEnterpriseServiceClientTest.php | 1366 ++++++++++++++++ .../RecaptchaEnterpriseServiceClientTest.php | 1237 +++++++++++++++ 108 files changed, 18746 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/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/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/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/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/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/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/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/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/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/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/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/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_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/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..3777dcf196343afc03baae86aa1240bcf189d5ba GIT binary patch literal 20924 zcmd5^U2GfKbq+~Mwk~anp7q)?z24={{@Gres^!gQ!(H!YNKw+n6v^d}y!NUcjL4D1 zm?9YtDMxXghay1x+5|1oAEZSP^uI4n+lS^QZ!Ll%1zMm$-G?sFB1PRk^|22{zjN=M z;S4qOj$}VH4;yRl+;h)8fA^g4p5X@{^>%ygwbZKBvHIq~YNoahQiEM9)$4Z$-A1>a z+8S^x*r`z3WTZ@f$ci3F)TMe@} zXzZF+XJGYv{g!Pl?%xP{oaQSr)-m@iyJt46)M`1qZVk+)IWRX@Inm7=5#6jDCc3$C z<9)^&ZPT_>0mJMeOW}XL;a0oVNZA8(fd6~FWgD$dYtS;=t#4w-w^G|?+qOXG@Vnc? zPGivOc2YE<)M;3kucQP`diV8S7ZSRaa@Z`B&>*l)op#+Z+ndXl-RQS^gKoc!S2LL% zYv78So?N~nmnCwo?bKz#VwKla* zr%O`kcI-@Mw5Jh?NfUGJ7F2n(IV&xz-OO6M=6;p8ixfo;;gu_cu+U%23Tp)WNo zhc3z?9u43^ix%ln4mz>L9Te2}psBH?-8Tk~I^+uu)BRp!k$h}uivjfyBJ6ywZz1++ zwr$z=9`;kQzCMI9l^mPtnSDH1h@>KyXR|jy)1v>QU1x7|`8Ye+Gdt!EBBR&=q++KL zEf--`U$YtmWsNaJCrNoB3PSOvMfvhm1)Ux-l#O9!^*hrnQR|x>+vG7RzYoro24fce z!x$X&EY9cL(pN)~A19R_e^3KOS~;S;z-AyKyW8RX&x(f%o8C9uLu(<1Jw?Q`n=Uty z|H2gCY|`PzQBK3-F4z4rM?|H5j@|9YG(c3E(t-fsFw8c(yg1xvh z$JprY#3|(^wlMk|8!K1xRWL|QCQgs7iEZaA)qG-3QP^B1zfvzQW5&nze6^OC_dIiU zoFM+idx}Jt(q_xzEV>l`VLXdv0+HoLkZz zqk3AXN>60W8Nop)4EIxZLRh#BbBRXJB&U+=v&S^!M5;vnU2ZBiz@~e7HU)O5n zI{2HLUcEp@6jc^jqO4V`cS@CIBUh?a^0`_fmW-Z^fU4q-=tXC2ipJExi^6ue7|04M zd94a3_Is}1mLp@HzQ^jUB8&~mwaxrTUgYJ5Z* z`?ByB$CcOe^@?7t>A5Nwz*)Tr`9M6&M(s|?SV2rGRT3wZ7ugvSfd6rf9V2Cy2uzd ztbS{|)!?a~-r4Rd=h@TOA(edFYQRAF*>txd+C+XBC5v+;Aa3mSyauB{^09d5WFagkK!uy3S^u_lV;d z&dyt*JYtd@gu`KPZL_m8#JO!Wx=nF}$z!d}l5J!IBu za8krc3Xj82K*->sVn~g3+)W6}LLkkMesn!d%G0(vvRjtFMt5u_3%~uS>b#WX< z=se0-Dy51TfXj~tqsr?nB?hZ{EpL>H*^*XS){Cn+j&h~-av=}TiYc$Ki{dS~x?a}l zydyeVp-{R57n)M8us6nE(6V5}DCp~Y&B%YUrq!$DZPO!maus+`4%Vy}Yxzo1E8y%@ z*~@}X4zHJRUK=0R5u-c=PK=lldlUzuk-aPY4)Fn@O%TBg%X+S6tm{=ovfNr?R{h%u zd!^iO?L(zy3?|Ur`3n=Yw_x`YFP?$D)eQUe*4elU3Ku48p>=moi=pXb@ zAseJGqtUmT$huHN+I$jMo($(#*`?9jZ7gQ&nW%*&T}zxW{N0$6X0P_G(c8haDUTBG ztABk0LETL!k-d1&S8h=svT1REh*a}xC{yLRr0|V(_8}AJ{G8mQvOmq3BdF zQgfmd0AhY#$&+q3$E7WOal!goSZtWoSiE-mK@q6RzboTT0mB+twbLJ^+eok9q^ z?4q+k)7nM|g34h%P8L7IMe^ZM)>)QhM#>Xg88Q{{2$`qRllEzFoAGVzBwuhj)PkR5 z?P7!5EV1*5oc9ms=$KR(YGj}bVzP?nNw%46## zHqQrIJ@;z`>tYHpMPYM$nB?uH0`>h2s zQc3YucJ_g}EfNQ>zGp|%6D;;M^X3AXnw*4Xb}bXGW-r8X)XS%vZyh#OiwaMk+boMog8(Dnm%b_CSIJ0#S5S)I@X7{W<@afKg0tMxj&q{KgO~YUJ?1i~!Ag6i2^>&y0Nqp%m$J+O*AVhTlC!YL4gq@I@LxMSra=g_eAkS;6@J2_8(UCVI zEVa80Am@VvuZ^bI3ubc!q%#yR%sGzXY@;_&$;FY0@kn4m^b|j1LVoZJUhjB=Cp<&cK;mq*ntTf~ zoLv~JgFIeFF3n3McOJ1X<|Vh;6lv{nDi)!*E*y|jG3kI1;Ma#RJ4b+$T?o)I$Z?QB z3gg=m7WXJJXg!s^=-3RLk{5+SrlPXo5eTu~+_w$?xaSKmY=`z1_=BJN z-56?bPvS@Wwj15PfPJE*kC=kP)J0gxp5~TTLfNvHa5_g9J#Jk)f>>h88*IV)#()yF zCRL@)R%3uY5M(LRZ7#%^`X3Q?Hi!u3znUwcj(34Jz+%C81)#waiVK1Y3H~@&FXlf1 z7D>QBzPO=RN=1&mMXA=Wl}g5XJ-226h*$xHhsx>_yWp8ouWGA#l>9X+h^nZo09v5L z0?1Na(E(cK@aRxFX&>Lp z%PgrEH?)FI@MwS?aJ}CymhKc$%zEF0O`K-4>sn!@R9Q#)8&%@$1Pny4;E$Mcl1(kw z%Xugok5Q#oQF%kR0HL#$(jBVfc_EvaQGYnaE=5f@?Rvv=K_X6FEp%IepzFzagAXIQxK|<@pT3C_D`jgFM{Emp*>RrE|!j zYJ#$F)n8-_&V>^W6Kq>xI1~$H$ytBKm7U8>vt1+V-qn-W*!c-Ep-?@hp(L_ejI}LBF7I4qIn6W=^*x2NJN<{*`X}(hLA-g z)pC+rn&jZ6oGi1rXEi`p=gDW0R5Z;4+h}(mpc>x-jxNI3w6Hl!dk;G3UBDf`!NpAs z35Q4m1&Vu?QA~s+%EQ~{mW5K0kj1&B)$rC4z&hVXf#`95)O&1}R^(6UoS=|x6trx< zFoxtI65z_Ftm(@L9{2-iNDWt12p#9y3!by0P?A?bG4)4LT)GIz^f0cV?6Mi(zN(@2 zHIZI=Y{aw2AL2L-8l{^%;O(V4aKq*NO1`*^$QHDB1U_8XtpF%D1Yj4T1CkCjJ*SuI zRijW^)r$sQ0B-0ty21l8=^1tw$stPfBRQs|*h`gsfdln&v}zRV>sfHHrmwCgrqu67 zaNkB*qjlRlc&>N785VQu_4v}|P+|uQWG_+mmm_SxfczN`?B~i968s(=lQz0tc<|>A z6QQJ;+IYzjMbF!<10!y@w?BxX3P!GTzbC!^}mvzIH@px**2 zRIql;#zECWCQrL}Hvhg5rocqf{Oa&Bdo#qMJ5p#?L@l$#vemYHTs+&x{vyII3SaQ!c#aaD zOAExuY<>)ElpDSo%0>K~32%W9UnC>-jR9MJu6!TabKt`-1#>0csL0OvB|&hwxYs(4 zEGD~GgDt@RebR9qYt`opU*?{5lidj6S$=xz??DN|EBphF5(4xtoaH!seHOpjW*3Fu z1oQda1kz_`)>}K&Na=}V&*Y$VH)Y=ksOtc0ja{oD;)TE;R5TAj)99G&w;Hbbf5oTb zC9dLY>}m)VOG4_8qbN`WQ5S0PlwoPc0NM1>c0{+nLaT?vm)q!rE~wKS5+F>J7)1ae z&@CJ~UnMZXVWtd#Vi(sIRtG1FLoLRsg=?0`IkP3j%*GR~dKB3xZv?>nbUH3R#D528)g!<8Qn;|Gm2PhjnQXVB-VSA-5@jv`8cLSWWUv1STIF$K}hsc*YI z-crkfhWJvr4ao|&B&PE7ovRSnCa!?QJ>1WQlK35S+tD8Jx1>YY=if9THI4|!0K-}6v>MsDK6RWrbfS4}T&=5yW5ooL{pa%*Voxg7h7*7%9 zSQ$MA8mcyca2PKYHnc1%8Fx}5s{UY#&H0@R*wPttM?ma0x_r1;B#gbq5@`Ri=nx{Xop*(j>Lk=8BngXE3R^l zYCeY!vD#e&)%!}m!ok`@Rsw)Gs~4zr<+XiQD^N2i76uy*0j&G$5vCjtnH>3WO~ng$ z()sBc3}Ao9VEpfR%;sHo#UA#0U7Xk*n1yJzG|XPl08rQmvO+gEt*s%y8m3xMW*2_~ zr}c+kxX0O%{kkBlk0T^44o99BJnU@XgZarxnO>xKmuC>C4V+y(x_2 z9!rc5;6gU;bXeTSWjYUl*%_RepJ`Ks2jd|v&dXAwLdgAzfo1MFEOF0^s(%;(0#BL9 zvPV`x&t+n>HEi6saGNNy`L$5Ce~4U~KgkMG{Dey0l&g9ldV~42KbXfTn5%yrWv4hP zCu=IP`7QupXvNK$MAG)|@ffB1oH>D{y97l_7cMw^nFGK?W+zz{yKciD4n6g5dsfMN z&#?H?F*m}+)de8rxVb99ft1LHKCxI{zKF1MT*FS&37%D--s17teX%6DoT4VDPo z;&rlS{*?N9+@}-iZm^T+$Ac_@^oyi2+~w66n-xjJrF#!m&TtEN7=z(JG>OJTCLd#zt1cCn_Fd4n z28QT(k@pkf`bx)XTZ1*;Hsg>^o@Q~6#OY6uxRMEU{`)qXe1j#%8Kj!8XAX8{xP-k$ zl3!x;$S}QYq3e2-RPqSyzw;J3OZGf_aoaIelY6y+hU4zG`rFZwxrzR{|+MnF`RW^anyQ65GRSp%LDPUl9K#fPIm z9;yElVJ`$oO+gPL2i-&oAw8cR)AKXme4;%#?qucGGi_b{&nSy~03)T&;?%E;EB^f! z>UY}U+|v7@f`o@mn*W=VpyM*?kln^z>k#c=r2b=)T@fTWS+&a;R+5kC`;t4_im`$l zV0@1`2Grm)$5F*zMza;_a9lc9@!br4Qd%qB&KFUQpxI*D6AIRx)lh^nr$(21@^fl^VeUvdJ zADPJ2$J#u-d`&(=da0m;c2)=Wj)vt_MiiYe4wZUWDcJgZmmDYos3qH`g#4s?>h{ia}c%|n*Vf&Dn)ly81Dqm9MSzwgt5`BuM!T28clF` z2`{`wF1#!1>w#g+vBEuZ5smPr{607w-4Tc6a5TZ;@R}p7r$RpxKT~gVF5gt1#-(#r z`pA(b@6YC~Sq{h{VS#WTK8OhGpXzXbw4z@utKQ?AcwfCdDen48b`Ih&`(3Q%%DlF~@%K90=bh71ulFe4ao%@rf zJ3NQ`HIT_vq*LAEYD_C40S(Bq1L{_(6cj(iw_<=km7TH z;L02hcE!*AU3Z#2vcC~!uj0qA97zW)v411G5Ks)4DFZ7_Xg7^Iy{1>0;9X zzbCk~2wsAJRj{}9e!!I8*7u`RtLPQ~qv&g^{FepsMHzlsFde{8dgI1VoVPaR4-k%i zfpApBZ{jBipG4mjgoogle.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..2cca8bd51573 --- /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 hashed account ID field in Event. + * + * 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 hashed account ID field in Event. + * } + */ + 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 hashed account ID field in Event. + * + * 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 hashed account ID field in Event. + * + * 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/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..b3602b110bf1 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php @@ -0,0 +1,269 @@ +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 will be 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. Optional reasons for the annotation that will be 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. Unique stable hashed user identifier to apply to the assessment. + * This is an alternative to setting the hashed_account_id in + * CreateAssessment, for example when the account identifier is not yet known + * in the initial request. It is recommended that the identifier is hashed + * using hmac-sha256 with stable secret. + * + * 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 will be 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 will be 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. Optional reasons for the annotation that will be assigned to the + * Event. + * @type string $hashed_account_id + * Optional. Unique stable hashed user identifier to apply to the assessment. + * This is an alternative to setting the hashed_account_id in + * CreateAssessment, for example when the account identifier is not yet known + * in the initial request. It is recommended that the identifier is hashed + * using hmac-sha256 with stable secret. + * @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 will be 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 will be 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. Optional reasons for the annotation that will be 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. Optional reasons for the annotation that will be 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. Unique stable hashed user identifier to apply to the assessment. + * This is an alternative to setting the hashed_account_id in + * CreateAssessment, for example when the account identifier is not yet known + * in the initial request. It is recommended that the identifier is hashed + * using hmac-sha256 with stable secret. + * + * 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. Unique stable hashed user identifier to apply to the assessment. + * This is an alternative to setting the hashed_account_id in + * CreateAssessment, for example when the account identifier is not yet known + * in the initial request. It is recommended that the identifier is hashed + * using hmac-sha256 with stable secret. + * + * 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..401ffeb40f4b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php @@ -0,0 +1,495 @@ +google.cloud.recaptchaenterprise.v1.Assessment + */ +class Assessment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. 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]; + */ + 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 a + * hashed_account_id 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; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. 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 a + * hashed_account_id 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. 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]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. 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]; + * @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 a + * hashed_account_id 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 a + * hashed_account_id 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; + } + +} + 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..a2a2e8eee258 --- /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 will be 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 will be 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 will be 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 will be 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 will be 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..6c21ea7f41fb --- /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 will apply 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 will apply 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 will apply 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 will apply 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 will apply 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..25ea7e47cad9 --- /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 will be 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 will be 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 will be 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 will be 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 will be 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..40cc39f11760 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php @@ -0,0 +1,545 @@ +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]; + */ + 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. 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 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $hashed_account_id = ''; + /** + * Optional. Flag for a reCAPTCHA express request for an assessment without a + * token. If enabled, `site_key` must reference a SCORE key with WAF feature + * set to EXPRESS. + * + * 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 will be evaluated and a + * suggested firewall action will be 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; + + /** + * 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. 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 a SCORE key with WAF feature + * set to EXPRESS. + * @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 will be evaluated and a + * suggested firewall action will be 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. + * } + */ + 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]; + * @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]; + * @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. 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 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHashedAccountId() + { + return $this->hashed_account_id; + } + + /** + * Optional. 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 [(.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. Flag for a reCAPTCHA express request for an assessment without a + * token. If enabled, `site_key` must reference a SCORE key with WAF feature + * set to EXPRESS. + * + * 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 a SCORE key with WAF feature + * set to EXPRESS. + * + * 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 will be evaluated and a + * suggested firewall action will be 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 will be evaluated and a + * suggested firewall action will be 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; + } + +} + 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..9be6d77d7dbd --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php @@ -0,0 +1,223 @@ +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 will deny access to a given page. The user will get an HTTP + * error code. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction $redirect + * This action will redirect the request to a ReCaptcha interstitial to + * attach a token. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction $substitute + * This action will transparently serve a different page to an offending + * user. + * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction $set_header + * This action will set 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 will deny access to a given page. The user will get 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 will deny access to a given page. The user will get 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 will redirect 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 will redirect 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 will transparently serve 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 will transparently serve 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 will set 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 will set 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/RedirectAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php new file mode 100644 index 000000000000..6151c5b27f83 --- /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..054a37930f49 --- /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 +{ + /** + * The resource name for the FirewallPolicy in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * Generated from protobuf field string name = 1; + */ + 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 + * 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); + } + + /** + * The resource name for the FirewallPolicy in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the FirewallPolicy in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * 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..99ff43d3979e --- /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 will be + * populated and the firewall_policy will be 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 will be 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 will be + * populated and the firewall_policy will be 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 will be 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 will be + * populated and the firewall_policy will be 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 will be + * populated and the firewall_policy will be 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 will be 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 will be 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..f1fe5348973b --- /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 Enterprise leverages platform-specific checks + * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. + * Providing these fields allows reCAPTCHA Enterprise 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 Enterprise leverages platform-specific checks + * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. + * Providing these fields allows reCAPTCHA Enterprise 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 Enterprise leverages platform-specific checks + * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. + * Providing these fields allows reCAPTCHA Enterprise 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 Enterprise leverages platform-specific checks + * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. + * Providing these fields allows reCAPTCHA Enterprise 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/Key.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php new file mode 100644 index 000000000000..a4d9c909af12 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php @@ -0,0 +1,384 @@ +google.cloud.recaptchaenterprise.v1.Key + */ +class Key extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the Key in the format + * `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1; + */ + 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-enterprise/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 + * 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 array|\Google\Protobuf\Internal\MapField $labels + * Optional. See [Creating and managing labels] + * (https://cloud.google.com/recaptcha-enterprise/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); + } + + /** + * The resource name for the Key in the format + * `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the Key in the format + * `projects/{project}/keys/{key}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * 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; + } + + /** + * Optional. See [Creating and managing labels] + * (https://cloud.google.com/recaptcha-enterprise/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-enterprise/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..463227847d0f --- /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/ListKeysRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php new file mode 100644 index 000000000000..a8d195ff3e5e --- /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 will be + * 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 will be + * 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 will be + * 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 will be + * 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 will be + * 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..bcc89c6e721e --- /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. The name of the metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * + * Generated from protobuf field string name = 4 [(.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 will be 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 will be continuous and in order by dates, and in the granularity + * of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will 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. 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 will be 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 will be continuous and in order by dates, and in the granularity + * of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will have + * challenge-based data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the metrics, in the format + * `projects/{project}/keys/{key}/metrics`. + * + * Generated from protobuf field string name = 4 [(.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 will be 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 will be 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 will be continuous and in order by dates, and in the granularity + * of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will 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 will be continuous and in order by dates, and in the granularity + * of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will 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..741b84b1ae2f --- /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-enterprise/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-enterprise/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-enterprise/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-enterprise/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-enterprise/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-enterprise/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-enterprise/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-enterprise/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/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..9e571e94f437 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php @@ -0,0 +1,71 @@ +google.cloud.recaptchaenterprise.v1.RelatedAccountGroup + */ +class RelatedAccountGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Required. 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) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. 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. 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) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. 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) = 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/RelatedAccountGroupMembership.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php new file mode 100644 index 000000000000..03e59e0b795b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php @@ -0,0 +1,113 @@ +google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership + */ +class RelatedAccountGroupMembership extends \Google\Protobuf\Internal\Message +{ + /** + * Required. 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) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The unique stable hashed user 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; + */ + protected $hashed_account_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name for this membership in the format + * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. + * @type string $hashed_account_id + * The unique stable hashed user 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. 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) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. 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) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The unique stable hashed user 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; + * @return string + */ + public function getHashedAccountId() + { + return $this->hashed_account_id; + } + + /** + * The unique stable hashed user 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; + * @param string $var + * @return $this + */ + public function setHashedAccountId($var) + { + 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/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..9bf44caebfc0 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php @@ -0,0 +1,147 @@ +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; + + /** + * 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. + * } + */ + 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; + } + +} + 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..fc401b9b1dbe --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php @@ -0,0 +1,233 @@ +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 hashed user identifier used to search + * connections. The identifier should correspond to a `hashed_account_id` + * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. + * + * Generated from protobuf field bytes hashed_account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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::relatedAccountGroupName()} for help formatting this field. + * @param string $hashedAccountId Optional. The unique stable hashed user identifier used to search + * connections. The identifier should correspond to a `hashed_account_id` + * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. + * + * @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 $hashed_account_id + * Optional. The unique stable hashed user identifier used to search + * connections. The identifier should correspond to a `hashed_account_id` + * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. + * @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 hashed user identifier used to search + * connections. The identifier should correspond to a `hashed_account_id` + * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. + * + * Generated from protobuf field bytes hashed_account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHashedAccountId() + { + return $this->hashed_account_id; + } + + /** + * Optional. The unique stable hashed user identifier used to search + * connections. The identifier should correspond to a `hashed_account_id` + * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. + * + * Generated from protobuf field bytes hashed_account_id = 2 [(.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. 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/TestingOptions.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php new file mode 100644 index 000000000000..754d0ea2cbf3 --- /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 will 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 will 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 will 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 will 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 will 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 will 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 will 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 will 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..68b29bada6af --- /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 will be 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 will be 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 will be 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 will be 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 will be 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..4b1f342c10d2 --- /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 will be 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 will be 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 will be 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 will be 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 will be 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/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..8971ae15d176 --- /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..b89f29a25f53 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php @@ -0,0 +1,64 @@ +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; + + private static $valueToName = [ + self::WAF_SERVICE_UNSPECIFIED => 'WAF_SERVICE_UNSPECIFIED', + self::CA => 'CA', + self::FASTLY => 'FASTLY', + ]; + + 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..c546cb45fcf4 --- /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 will not be 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. + * + * 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 will not be 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If set to true, it means allowed_domains will not be 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 will not be 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. + * + * 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. + * + * 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/annotate_assessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php new file mode 100644 index 000000000000..d36307bd057b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php @@ -0,0 +1,73 @@ +annotateAssessment($formattedName, $annotation); + 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..23223805303b --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php @@ -0,0 +1,70 @@ +createAssessment($formattedParent, $assessment); + 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..e7d88e842616 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php @@ -0,0 +1,75 @@ +createFirewallPolicy( + $formattedParent, + $firewallPolicy + ); + 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..9491a9c3e64e --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php @@ -0,0 +1,73 @@ +setDisplayName($keyDisplayName); + + // Call the API and handle any network failures. + try { + /** @var Key $response */ + $response = $recaptchaEnterpriseServiceClient->createKey($formattedParent, $key); + 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..abf2ab495135 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php @@ -0,0 +1,68 @@ +deleteFirewallPolicy($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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..c3713e62b35a --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php @@ -0,0 +1,65 @@ +deleteKey($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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..e268c35843a8 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php @@ -0,0 +1,70 @@ +getFirewallPolicy($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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..2b2c189cce17 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php @@ -0,0 +1,67 @@ +getKey($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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..6db489596c6e --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php @@ -0,0 +1,68 @@ +getMetrics($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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..8b8cd5a81717 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php @@ -0,0 +1,72 @@ +listFirewallPolicies($formattedParent); + + /** @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_keys.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php new file mode 100644 index 000000000000..1a095fdd94de --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php @@ -0,0 +1,72 @@ +listKeys($formattedParent); + + /** @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..c106e495cc03 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php @@ -0,0 +1,75 @@ +listRelatedAccountGroupMemberships($formattedParent); + + /** @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..a9995d7767e3 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php @@ -0,0 +1,72 @@ +listRelatedAccountGroups($formattedParent); + + /** @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..de94d6626c1a --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php @@ -0,0 +1,72 @@ +migrateKey($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = 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/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..9141cfc6e5f0 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php @@ -0,0 +1,69 @@ +retrieveLegacySecretKey($formattedKey); + 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..068e311d1518 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php @@ -0,0 +1,78 @@ +searchRelatedAccountGroupMemberships( + $formattedProject + ); + + /** @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::relatedAccountGroupName( + '[PROJECT]', + '[RELATEDACCOUNTGROUP]' + ); + + 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..72e18aa7f6df --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php @@ -0,0 +1,56 @@ +updateFirewallPolicy($firewallPolicy); + 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..aab6a7ea5ca5 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php @@ -0,0 +1,69 @@ +setDisplayName($keyDisplayName); + + // Call the API and handle any network failures. + try { + /** @var Key $response */ + $response = $recaptchaEnterpriseServiceClient->updateKey($key); + 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..759b20393081 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php @@ -0,0 +1,792 @@ + 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); + } + + /** + * 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()} . + * + * @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()} . + * + * @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()} . + * + * @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()} . + * + * @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()} . + * + * @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()} . + * + * @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()} . + * + * @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()} . + * + * @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()} + * . + * + * @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()} . + * + * @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); + } + + /** + * Returns the list of all keys that belong to a project. + * + * The async variant is {@see RecaptchaEnterpriseServiceClient::listKeysAsync()} . + * + * @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()} + * . + * + * @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()} . + * + * @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()} + * . + * + * @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(); + } + + /** + * 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()} . + * + * @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()} + * . + * + * @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()} . + * + * @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()} . + * + * @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..c7c9f524608f --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php @@ -0,0 +1,1371 @@ +assessmentName('[PROJECT]', '[ASSESSMENT]'); + * $annotation = Annotation::ANNOTATION_UNSPECIFIED; + * $response = $recaptchaEnterpriseServiceClient->annotateAssessment($formattedName, $annotation); + * } 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. + * + * This service has a new (beta) implementation. See {@see + * \Google\Cloud\RecaptchaEnterprise\V1\Client\RecaptchaEnterpriseServiceClient} to + * use the new surface. + */ +class RecaptchaEnterpriseServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'recaptchaenterprise.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $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); + } + + /** + * 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 will be 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. Optional reasons for the annotation that will be assigned to the + * Event. + * For allowed values, use constants defined on {@see \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Reason} + * @type string $hashedAccountId + * Optional. Unique stable hashed user identifier to apply to the assessment. + * This is an alternative to setting the hashed_account_id in + * CreateAssessment, for example when the account identifier is not yet known + * in the initial request. It is recommended that the identifier is hashed + * using hmac-sha256 with stable secret. + * @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['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 will be 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 will apply 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 will be 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); + } + + /** + * 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 will be + * 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-enterprise/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-enterprise/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(); + } + + /** + * 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + * // 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 $hashedAccountId + * Optional. The unique stable hashed user identifier used to search + * connections. The identifier should correspond to a `hashed_account_id` + * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. + * @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['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 will be updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\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 will be updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\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..529005a6c0fd --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' => [ + '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', + ], + ], + ], + ], + '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', + ], + ], + ], + ], + '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..be34edbcc6f1 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php @@ -0,0 +1,217 @@ + [ + 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' => [ + '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', + ], + ], + ], + ], + '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', + ], + ], + ], + ], + '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..e3d812aa2fac --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php @@ -0,0 +1,1366 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RecaptchaEnterpriseServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RecaptchaEnterpriseServiceClient($options); + } + + /** @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 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 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $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 annotateAssessmentAsyncTest() + { + $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->annotateAssessmentAsync($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/AnnotateAssessment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getAnnotation(); + $this->assertProtobufEquals($annotation, $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..5e9d83fa4168 --- /dev/null +++ b/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php @@ -0,0 +1,1237 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RecaptchaEnterpriseServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RecaptchaEnterpriseServiceClient($options); + } + + /** @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 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 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + 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 bc6f7e565b9131e1273c5ccd32b770d2f60e1022 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 7 Nov 2023 21:59:12 +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 --- .../metadata/V1/Recaptchaenterprise.php | Bin 20513 -> 20924 bytes .../create_key.php | 9 +- .../update_key.php | 27 +- .../src/V1/AccountDefenderAssessment.php | 14 +- .../src/V1/AccountVerificationInfo.php | 36 +- .../src/V1/AndroidKeySettings.php | 54 +- RecaptchaEnterprise/src/V1/Assessment.php | 124 +- RecaptchaEnterprise/src/V1/Event.php | 8 +- .../src/V1/FirewallAction/SetHeaderAction.php | 28 +- .../V1/FirewallAction/SubstituteAction.php | 22 +- RecaptchaEnterprise/src/V1/FirewallPolicy.php | 120 +- .../src/V1/FirewallPolicyAssessment.php | 22 +- .../src/V1/FraudPreventionAssessment.php | 84 +- .../BehavioralTrustVerdict.php | 30 +- .../CardTestingVerdict.php | 26 +- .../StolenInstrumentVerdict.php | 22 +- RecaptchaEnterprise/src/V1/IOSKeySettings.php | 58 +- RecaptchaEnterprise/src/V1/Key.php | 56 +- .../V1/PrivatePasswordLeakVerification.php | 14 +- RecaptchaEnterprise/src/V1/RiskAnalysis.php | 50 +- RecaptchaEnterprise/src/V1/TestingOptions.php | 52 +- .../src/V1/TokenProperties.php | 150 +- .../src/V1/TransactionData.php | 189 +-- .../src/V1/TransactionData/Address.php | 108 +- .../src/V1/TransactionData/GatewayInfo.php | 60 +- .../src/V1/TransactionData/Item.php | 72 +- .../src/V1/TransactionData/User.php | 116 +- RecaptchaEnterprise/src/V1/WebKeySettings.php | 96 +- .../RecaptchaEnterpriseServiceClientTest.php | 8 + .../RecaptchaEnterpriseServiceClientTest.php | 8 + .../V1/Recaptchaenterprise.php | Bin 20924 -> 0 bytes .../V1/AccountDefenderAssessment.php | 67 - .../AccountDefenderLabel.php | 82 - .../V1/AccountVerificationInfo.php | 182 --- .../V1/AccountVerificationInfo/Result.php | 123 -- .../V1/AndroidKeySettings.php | 147 -- .../V1/AnnotateAssessmentRequest.php | 269 ---- .../AnnotateAssessmentRequest/Annotation.php | 82 - .../V1/AnnotateAssessmentRequest/Reason.php | 165 -- .../V1/AnnotateAssessmentResponse.php | 33 - .../V1/AppleDeveloperId.php | 147 -- .../RecaptchaEnterprise/V1/Assessment.php | 495 ------ .../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 | 545 ------- .../RecaptchaEnterprise/V1/FirewallAction.php | 223 --- .../V1/FirewallAction/AllowAction.php | 36 - .../V1/FirewallAction/BlockAction.php | 37 - .../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 -- .../Cloud/RecaptchaEnterprise/V1/Key.php | 384 ----- .../V1/ListFirewallPoliciesRequest.php | 162 -- .../V1/ListFirewallPoliciesResponse.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/PrivatePasswordLeakVerification.php | 201 --- .../V1/RelatedAccountGroup.php | 71 - .../V1/RelatedAccountGroupMembership.php | 113 -- .../V1/RetrieveLegacySecretKeyRequest.php | 86 -- .../V1/RetrieveLegacySecretKeyResponse.php | 80 - .../RecaptchaEnterprise/V1/RiskAnalysis.php | 147 -- .../V1/RiskAnalysis/ClassificationReason.php | 101 -- .../V1/ScoreDistribution.php | 75 - .../RecaptchaEnterprise/V1/ScoreMetrics.php | 115 -- ...hRelatedAccountGroupMembershipsRequest.php | 233 --- ...RelatedAccountGroupMembershipsResponse.php | 105 -- .../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 -- .../RecaptchaEnterprise/V1/WafSettings.php | 102 -- .../V1/WafSettings/WafFeature.php | 81 - .../V1/WafSettings/WafService.php | 64 - .../RecaptchaEnterprise/V1/WebKeySettings.php | 227 --- .../ChallengeSecurityPreference.php | 72 - .../V1/WebKeySettings/IntegrationType.php | 76 - .../annotate_assessment.php | 73 - .../create_assessment.php | 70 - .../create_firewall_policy.php | 75 - .../create_key.php | 73 - .../delete_firewall_policy.php | 68 - .../delete_key.php | 65 - .../get_firewall_policy.php | 70 - .../get_key.php | 67 - .../get_metrics.php | 68 - .../list_firewall_policies.php | 72 - .../list_keys.php | 72 - ...list_related_account_group_memberships.php | 75 - .../list_related_account_groups.php | 72 - .../migrate_key.php | 72 - .../retrieve_legacy_secret_key.php | 69 - ...arch_related_account_group_memberships.php | 78 - .../update_firewall_policy.php | 56 - .../update_key.php | 69 - .../RecaptchaEnterpriseServiceClient.php | 792 ---------- .../RecaptchaEnterpriseServiceGapicClient.php | 1371 ----------------- .../V1/RecaptchaEnterpriseServiceClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 108 -- ...tcha_enterprise_service_client_config.json | 122 -- ...a_enterprise_service_descriptor_config.php | 274 ---- ..._enterprise_service_rest_client_config.php | 217 --- .../RecaptchaEnterpriseServiceClientTest.php | 1366 ---------------- .../RecaptchaEnterpriseServiceClientTest.php | 1237 --------------- 138 files changed, 871 insertions(+), 19538 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/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/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/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/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/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/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/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/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/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/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/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/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_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/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/metadata/V1/Recaptchaenterprise.php b/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php index fb73b9cae59beb0974163c1b88149e673044f588..3777dcf196343afc03baae86aa1240bcf189d5ba 100644 GIT binary patch delta 2056 zcmZuyTWB0r80PG3+TMYu|DVfu z`Tx0e5q*9Iee{i%c<=4zP3_apP9fM0f3ln>_+eM^j@g|43D>br0P0O>X zq2K1eoB*Qy$pMFOYYa2m-S~8iHjKi8Q6Jl1ou`+qe9)#tkAIR*#>I8LLbDP7V&L! znYl)yz0CK>WrqZzS@LRr?BxQLRr7u7S`CFN+1{w*jyiE_)ac-ANIX7=bbeY;X4NWl zS4@@dS6rxvR+&OjXc0NzMc2}iC)vIs&P&ms;B8*$7z+)wNZ zb6F7jBxH4J5}y(yhTOp2K3zG-JXet-2vAb%JXQ6AkT@!{p_R#AMmTvapuRqgF|jPK z#zkVb(XJ4CEq+rd&gGzmbeh7;siqaeod4(sr;Q=Sfu6xV)w1VO)2&sOsULrCM-9y(k+;`MlrS5|7RjD5`Do^8P=V}VgB)6Jw!qySh)0#dFuZ--J1ZjfA zGIxmNyX7fOpTGmewSAA-W|dg0VvNX=&UFWAq8XVNn9DWScBt@9S3B2_Hz>4HUTH=x ze*xi5bFO^ZVM@RleGN6?{n0Tr1~*2H2G(Q=?gOb-1 zI0N(PEGolix%JUDGI6S_aI*tz2WUg@iF;Hy-ey77Aq_=S%Q^|T^6>9y4qo53FB-5v zZks`eAT@bVf!u*cmEvmKKwUw%HZK=d8+2*Pi zUfw~`3vg#gJ-YJL&hL#k5!Q>!Eb(jahXaMp5y(6^g|R5!1?LM>S$SRl8V5T!ekqe{YZY}#aJa35#yDN1bWM^!1TtNX^P6qe`OOvv5t7^Kg^!py!N VN!6pyuSJHZfIO3L-k7nCe*sd$JDLCh delta 1580 zcmZ8hU1%It80F6HHoLb;HhYu(o9t$H(_)3X-KLl{d9biGGzkWhHh(3w40mVlCPQXt z#+lg-`(&X-MG>MON})_mp;z-ch7gu z`DX7kw0jGE@oh-DezWr+bT=A)6vk<|+LxBdBJB1qrb!a_8Pwcp(ha7lmc}xnB6=~_ zA$@}qLhwTT-D9_VFs`~TbKM3rJ(9p-lQvieiMsQlpQ|A<1>eV~fDC+&*5Tg3xsKn!{P(48$C!>bA~- z?<0=m9vWmh;1CDQS1>G<8oJlshdK;%nc+Dyh>tpKL$}NTuK*YmLECaYY6QU}A}HTL zIK1LAhY*aZs#;A>ldfg_BpHOSGlL1j7iA5q8wWJO(@g3d8N$8xre!k4Y&L4l$poYb zw*6>}IeJ}Zn$J#DzJ$Yb9&3=^Kv?**Jd{LYf!CYV^bQsXkzsfzJ6w=$d~}9-Y@4>{ z%(`{Zwa-Hy9%l0sB#RTYwD@QiS_*5uVDwAHNyG@nvg^nTw8PGsn}J-@|3*TnUdx$vQ-G+>{ll z=PGMru}#jk@8N)$93G;k=2*I>*i_vTm*8ikzBb%qy5%ahrl}cB2oUqb{rCt~J+7nA zVhker55qfQoQ2{@Hb*jez;meS1|^EaH}b(qqzymh+Y+(h@`xpoZFn%U9g?q{fcb(v z!4-H`DUV|ED!+nd=6c+?tIW}K)f0So)m%A&Q&1_S;({m7X}W0(pTd)NWE=j_*Q%Q*^@X0CVg9@dbj{Y@P;}0$|Pwe3O#xM+PTcL)b zXco7w>H7B(C21VzL2H|7hY94Lk}y-y)36oJYQ3(jzTczpsKQVS&Yo_;m!}_R-a?pE z10lQLEWoX?LW$&Y@?d_q$}ZPM9PAi885>&|{gkgYx3JXRFYIxM`OpS#0D;Ju9E|PC z1v4)~`^?48!!x%fv;*z&94f&_<0aS|Uq(N55)*%;my38{safL!drgm3eLo3tZ0cZ5PNwaFqHgx$%(V~4W>qw^n^ VYMGk;%(i42ewm!^RHoj`{12!KO diff --git a/RecaptchaEnterprise/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php b/RecaptchaEnterprise/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php index 4ca30880cc87..9491a9c3e64e 100644 --- a/RecaptchaEnterprise/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php +++ b/RecaptchaEnterprise/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php @@ -33,14 +33,16 @@ * @param string $formattedParent The name of the project in which the key will be created, in the * format `projects/{project}`. Please see * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. + * @param string $keyDisplayName Human-readable display name of this key. Modifiable by user. */ -function create_key_sample(string $formattedParent): void +function create_key_sample(string $formattedParent, string $keyDisplayName): void { // Create a client. $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); // Prepare any non-scalar elements to be passed along with the request. - $key = new Key(); + $key = (new Key()) + ->setDisplayName($keyDisplayName); // Call the API and handle any network failures. try { @@ -64,7 +66,8 @@ function create_key_sample(string $formattedParent): void function callSample(): void { $formattedParent = RecaptchaEnterpriseServiceClient::projectName('[PROJECT]'); + $keyDisplayName = '[DISPLAY_NAME]'; - create_key_sample($formattedParent); + create_key_sample($formattedParent, $keyDisplayName); } // [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] diff --git a/RecaptchaEnterprise/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php b/RecaptchaEnterprise/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php index 3eca748aa34a..aab6a7ea5ca5 100644 --- a/RecaptchaEnterprise/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php +++ b/RecaptchaEnterprise/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php @@ -30,19 +30,16 @@ /** * Updates the specified key. * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. + * @param string $keyDisplayName Human-readable display name of this key. Modifiable by user. */ -function update_key_sample(): void +function update_key_sample(string $keyDisplayName): void { // Create a client. $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); // Prepare any non-scalar elements to be passed along with the request. - $key = new Key(); + $key = (new Key()) + ->setDisplayName($keyDisplayName); // Call the API and handle any network failures. try { @@ -53,4 +50,20 @@ function update_key_sample(): void printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); } } + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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/RecaptchaEnterprise/src/V1/AccountDefenderAssessment.php b/RecaptchaEnterprise/src/V1/AccountDefenderAssessment.php index f0127e14b40e..a9ab1644bb8c 100644 --- a/RecaptchaEnterprise/src/V1/AccountDefenderAssessment.php +++ b/RecaptchaEnterprise/src/V1/AccountDefenderAssessment.php @@ -16,9 +16,9 @@ class AccountDefenderAssessment extends \Google\Protobuf\Internal\Message { /** - * Labels for this request. + * Output only. Labels for this request. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1; + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $labels; @@ -29,7 +29,7 @@ class AccountDefenderAssessment extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array|\Google\Protobuf\Internal\RepeatedField $labels - * Labels for this request. + * Output only. Labels for this request. * } */ public function __construct($data = NULL) { @@ -38,9 +38,9 @@ public function __construct($data = NULL) { } /** - * Labels for this request. + * Output only. Labels for this request. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1; + * 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() @@ -49,9 +49,9 @@ public function getLabels() } /** - * Labels for this request. + * Output only. Labels for this request. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel labels = 1; + * 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 */ diff --git a/RecaptchaEnterprise/src/V1/AccountVerificationInfo.php b/RecaptchaEnterprise/src/V1/AccountVerificationInfo.php index bdffc4af6357..9c631909c449 100644 --- a/RecaptchaEnterprise/src/V1/AccountVerificationInfo.php +++ b/RecaptchaEnterprise/src/V1/AccountVerificationInfo.php @@ -16,16 +16,16 @@ class AccountVerificationInfo extends \Google\Protobuf\Internal\Message { /** - * Endpoints that can be used for identity verification. + * Optional. Endpoints that can be used for identity verification. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1; + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $endpoints; /** - * Language code preference for the verification message, set as a IETF BCP 47 - * 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; + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $language_code = ''; /** @@ -50,10 +50,10 @@ class AccountVerificationInfo extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\RecaptchaEnterprise\V1\EndpointVerificationInfo>|\Google\Protobuf\Internal\RepeatedField $endpoints - * Endpoints that can be used for identity verification. + * Optional. Endpoints that can be used for identity verification. * @type string $language_code - * Language code preference for the verification message, set as a IETF BCP 47 - * 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 @@ -67,9 +67,9 @@ public function __construct($data = NULL) { } /** - * Endpoints that can be used for identity verification. + * Optional. Endpoints that can be used for identity verification. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1; + * 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() @@ -78,9 +78,9 @@ public function getEndpoints() } /** - * Endpoints that can be used for identity verification. + * Optional. Endpoints that can be used for identity verification. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo endpoints = 1; + * 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 */ @@ -93,10 +93,10 @@ public function setEndpoints($var) } /** - * Language code preference for the verification message, set as a IETF BCP 47 - * 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; + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getLanguageCode() @@ -105,10 +105,10 @@ public function getLanguageCode() } /** - * Language code preference for the verification message, set as a IETF BCP 47 - * 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; + * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/AndroidKeySettings.php b/RecaptchaEnterprise/src/V1/AndroidKeySettings.php index caa6d695edf4..67b074a69f36 100644 --- a/RecaptchaEnterprise/src/V1/AndroidKeySettings.php +++ b/RecaptchaEnterprise/src/V1/AndroidKeySettings.php @@ -16,23 +16,24 @@ class AndroidKeySettings extends \Google\Protobuf\Internal\Message { /** - * If set to true, allowed_package_names are not enforced. + * Optional. If set to true, allowed_package_names are not enforced. * - * Generated from protobuf field bool allow_all_package_names = 2; + * Generated from protobuf field bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $allow_all_package_names = false; /** - * Android package names of apps allowed to use the key. + * 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; + * Generated from protobuf field repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $allowed_package_names; /** - * 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. + * 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; + * Generated from protobuf field bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $support_non_google_app_store_distribution = false; @@ -43,13 +44,14 @@ class AndroidKeySettings extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type bool $allow_all_package_names - * If set to true, allowed_package_names are not enforced. + * Optional. If set to true, allowed_package_names are not enforced. * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_package_names - * Android package names of apps allowed to use the key. + * Optional. Android package names of apps allowed to use the key. * Example: 'com.companyname.appname' * @type bool $support_non_google_app_store_distribution - * 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. + * 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) { @@ -58,9 +60,9 @@ public function __construct($data = NULL) { } /** - * If set to true, allowed_package_names are not enforced. + * Optional. If set to true, allowed_package_names are not enforced. * - * Generated from protobuf field bool allow_all_package_names = 2; + * Generated from protobuf field bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getAllowAllPackageNames() @@ -69,9 +71,9 @@ public function getAllowAllPackageNames() } /** - * If set to true, allowed_package_names are not enforced. + * Optional. If set to true, allowed_package_names are not enforced. * - * Generated from protobuf field bool allow_all_package_names = 2; + * Generated from protobuf field bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -84,10 +86,10 @@ public function setAllowAllPackageNames($var) } /** - * Android package names of apps allowed to use the key. + * 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; + * Generated from protobuf field repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getAllowedPackageNames() @@ -96,10 +98,10 @@ public function getAllowedPackageNames() } /** - * Android package names of apps allowed to use the key. + * 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; + * Generated from protobuf field repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -112,10 +114,11 @@ public function setAllowedPackageNames($var) } /** - * 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. + * 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; + * Generated from protobuf field bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getSupportNonGoogleAppStoreDistribution() @@ -124,10 +127,11 @@ public function getSupportNonGoogleAppStoreDistribution() } /** - * 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. + * 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; + * Generated from protobuf field bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/Assessment.php b/RecaptchaEnterprise/src/V1/Assessment.php index 10f4781a8549..13f7beee7551 100644 --- a/RecaptchaEnterprise/src/V1/Assessment.php +++ b/RecaptchaEnterprise/src/V1/Assessment.php @@ -23,9 +23,9 @@ class Assessment extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * The event being assessed. + * Optional. The event being assessed. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $event = null; /** @@ -41,37 +41,39 @@ class Assessment extends \Google\Protobuf\Internal\Message */ private $token_properties = null; /** - * Account verification information for identity verification. The assessment - * event must include a token and site key to use this feature. + * 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; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $account_verification = null; /** - * Assessment returned by account defender when a hashed_account_id is - * provided. + * Output only. Assessment returned by account defender when a + * hashed_account_id is provided. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $account_defender_assessment = null; /** - * The private password leak verification field contains the parameters that - * are used to to check for leaks privately without sharing user credentials. + * 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; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL]; */ private $private_password_leak_verification = null; /** - * Assessment returned when firewall policies belonging to the project are - * evaluated using the field firewall_policy_evaluation. + * 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; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $firewall_policy_assessment = null; /** - * Assessment returned by Fraud Prevention when TransactionData is provided. + * Output only. Assessment returned by Fraud Prevention when TransactionData + * is provided. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $fraud_prevention_assessment = null; /** @@ -92,25 +94,27 @@ class Assessment extends \Google\Protobuf\Internal\Message * Output only. The resource name for the Assessment in the format * `projects/{project}/assessments/{assessment}`. * @type \Google\Cloud\RecaptchaEnterprise\V1\Event $event - * The event being assessed. + * 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 - * Account verification information for identity verification. The assessment - * event must include a token and site key to use this feature. + * 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 - * Assessment returned by account defender when a hashed_account_id is - * provided. + * Output only. Assessment returned by account defender when a + * hashed_account_id is provided. * @type \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification $private_password_leak_verification - * The private password leak verification field contains the parameters that - * are used to to check for leaks privately without sharing user credentials. + * 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 - * Assessment returned when firewall policies belonging to the project are - * evaluated using the field firewall_policy_evaluation. + * 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 - * Assessment returned by Fraud Prevention when TransactionData is provided. + * 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. @@ -150,9 +154,9 @@ public function setName($var) } /** - * The event being assessed. + * Optional. The event being assessed. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2; + * 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() @@ -171,9 +175,9 @@ public function clearEvent() } /** - * The event being assessed. + * Optional. The event being assessed. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2; + * 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 */ @@ -258,10 +262,10 @@ public function setTokenProperties($var) } /** - * Account verification information for identity verification. The assessment - * event must include a token and site key to use this feature. + * 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; + * 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() @@ -280,10 +284,10 @@ public function clearAccountVerification() } /** - * Account verification information for identity verification. The assessment - * event must include a token and site key to use this feature. + * 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; + * 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 */ @@ -296,10 +300,10 @@ public function setAccountVerification($var) } /** - * Assessment returned by account defender when a hashed_account_id is - * provided. + * Output only. Assessment returned by account defender when a + * hashed_account_id is provided. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6; + * 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() @@ -318,10 +322,10 @@ public function clearAccountDefenderAssessment() } /** - * Assessment returned by account defender when a hashed_account_id is - * provided. + * Output only. Assessment returned by account defender when a + * hashed_account_id is provided. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6; + * 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 */ @@ -334,10 +338,11 @@ public function setAccountDefenderAssessment($var) } /** - * The private password leak verification field contains the parameters that - * are used to to check for leaks privately without sharing user credentials. + * 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; + * 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() @@ -356,10 +361,11 @@ public function clearPrivatePasswordLeakVerification() } /** - * The private password leak verification field contains the parameters that - * are used to to check for leaks privately without sharing user credentials. + * 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; + * 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 */ @@ -372,10 +378,10 @@ public function setPrivatePasswordLeakVerification($var) } /** - * Assessment returned when firewall policies belonging to the project are - * evaluated using the field firewall_policy_evaluation. + * 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; + * 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() @@ -394,10 +400,10 @@ public function clearFirewallPolicyAssessment() } /** - * Assessment returned when firewall policies belonging to the project are - * evaluated using the field firewall_policy_evaluation. + * 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; + * 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 */ @@ -410,9 +416,10 @@ public function setFirewallPolicyAssessment($var) } /** - * Assessment returned by Fraud Prevention when TransactionData is provided. + * Output only. Assessment returned by Fraud Prevention when TransactionData + * is provided. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11; + * 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() @@ -431,9 +438,10 @@ public function clearFraudPreventionAssessment() } /** - * Assessment returned by Fraud Prevention when TransactionData is provided. + * Output only. Assessment returned by Fraud Prevention when TransactionData + * is provided. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11; + * 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 */ diff --git a/RecaptchaEnterprise/src/V1/Event.php b/RecaptchaEnterprise/src/V1/Event.php index f85e5443e8a3..763519875afd 100644 --- a/RecaptchaEnterprise/src/V1/Event.php +++ b/RecaptchaEnterprise/src/V1/Event.php @@ -81,7 +81,7 @@ class Event extends \Google\Protobuf\Internal\Message */ private $waf_token_assessment = false; /** - * Optional. Optional JA3 fingerprint for SSL clients. + * Optional. JA3 fingerprint for SSL clients. * * Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -145,7 +145,7 @@ class Event extends \Google\Protobuf\Internal\Message * If enabled, the token must be specified, and have been created by a * WAF-enabled key. * @type string $ja3 - * Optional. Optional JA3 fingerprint for SSL clients. + * 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 @@ -420,7 +420,7 @@ public function setWafTokenAssessment($var) } /** - * Optional. Optional JA3 fingerprint for SSL clients. + * Optional. JA3 fingerprint for SSL clients. * * Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -431,7 +431,7 @@ public function getJa3() } /** - * Optional. Optional JA3 fingerprint for SSL clients. + * Optional. JA3 fingerprint for SSL clients. * * Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/RecaptchaEnterprise/src/V1/FirewallAction/SetHeaderAction.php b/RecaptchaEnterprise/src/V1/FirewallAction/SetHeaderAction.php index 78b9409cc827..5015a45b4e99 100644 --- a/RecaptchaEnterprise/src/V1/FirewallAction/SetHeaderAction.php +++ b/RecaptchaEnterprise/src/V1/FirewallAction/SetHeaderAction.php @@ -18,15 +18,15 @@ class SetHeaderAction extends \Google\Protobuf\Internal\Message { /** - * The header key to set in the request to the backend server. + * Optional. The header key to set in the request to the backend server. * - * Generated from protobuf field string key = 1; + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $key = ''; /** - * The header value to set in the request to the backend server. + * Optional. The header value to set in the request to the backend server. * - * Generated from protobuf field string value = 2; + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $value = ''; @@ -37,9 +37,9 @@ class SetHeaderAction extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $key - * The header key to set in the request to the backend server. + * Optional. The header key to set in the request to the backend server. * @type string $value - * The header value to set in the request to the backend server. + * Optional. The header value to set in the request to the backend server. * } */ public function __construct($data = NULL) { @@ -48,9 +48,9 @@ public function __construct($data = NULL) { } /** - * The header key to set in the request to the backend server. + * Optional. The header key to set in the request to the backend server. * - * Generated from protobuf field string key = 1; + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getKey() @@ -59,9 +59,9 @@ public function getKey() } /** - * The header key to set in the request to the backend server. + * Optional. The header key to set in the request to the backend server. * - * Generated from protobuf field string key = 1; + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -74,9 +74,9 @@ public function setKey($var) } /** - * The header value to set in the request to the backend server. + * Optional. The header value to set in the request to the backend server. * - * Generated from protobuf field string value = 2; + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getValue() @@ -85,9 +85,9 @@ public function getValue() } /** - * The header value to set in the request to the backend server. + * Optional. The header value to set in the request to the backend server. * - * Generated from protobuf field string value = 2; + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/FirewallAction/SubstituteAction.php b/RecaptchaEnterprise/src/V1/FirewallAction/SubstituteAction.php index 0eafd65aaceb..02639a1b1a2c 100644 --- a/RecaptchaEnterprise/src/V1/FirewallAction/SubstituteAction.php +++ b/RecaptchaEnterprise/src/V1/FirewallAction/SubstituteAction.php @@ -17,10 +17,10 @@ class SubstituteAction extends \Google\Protobuf\Internal\Message { /** - * The address to redirect to. The target is a relative path in the - * current host. Example: "/blog/404.html". + * 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; + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $path = ''; @@ -31,8 +31,8 @@ class SubstituteAction extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $path - * The address to redirect to. The target is a relative path in the - * current host. Example: "/blog/404.html". + * 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) { @@ -41,10 +41,10 @@ public function __construct($data = NULL) { } /** - * The address to redirect to. The target is a relative path in the - * current host. Example: "/blog/404.html". + * 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; + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPath() @@ -53,10 +53,10 @@ public function getPath() } /** - * The address to redirect to. The target is a relative path in the - * current host. Example: "/blog/404.html". + * 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; + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/FirewallPolicy.php b/RecaptchaEnterprise/src/V1/FirewallPolicy.php index f09ac473def6..7309e32f820f 100644 --- a/RecaptchaEnterprise/src/V1/FirewallPolicy.php +++ b/RecaptchaEnterprise/src/V1/FirewallPolicy.php @@ -24,43 +24,45 @@ class FirewallPolicy extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * A description of what this policy aims to achieve, for convenience - * purposes. The description can at most include 256 UTF-8 characters. + * 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; + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $description = ''; /** - * The path for which this policy applies, specified as a glob pattern. - * For more information on glob, see the [manual + * 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; + * Generated from protobuf field string path = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $path = ''; /** - * 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 + * 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; + * Generated from protobuf field string condition = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $condition = ''; /** - * The actions that the caller should take regarding user access. + * 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; + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $actions; @@ -74,24 +76,26 @@ class FirewallPolicy extends \Google\Protobuf\Internal\Message * The resource name for the FirewallPolicy in the format * `projects/{project}/firewallpolicies/{firewallpolicy}`. * @type string $description - * A description of what this policy aims to achieve, for convenience - * purposes. The description can at most include 256 UTF-8 characters. + * 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 - * The path for which this policy applies, specified as a glob pattern. - * For more information on glob, see the [manual + * 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 - * 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 + * 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 - * The actions that the caller should take regarding user access. + * 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`. @@ -133,10 +137,11 @@ public function setName($var) } /** - * A description of what this policy aims to achieve, for convenience - * purposes. The description can at most include 256 UTF-8 characters. + * 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; + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getDescription() @@ -145,10 +150,11 @@ public function getDescription() } /** - * A description of what this policy aims to achieve, for convenience - * purposes. The description can at most include 256 UTF-8 characters. + * 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; + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -161,12 +167,12 @@ public function setDescription($var) } /** - * The path for which this policy applies, specified as a glob pattern. - * For more information on glob, see the [manual + * 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; + * Generated from protobuf field string path = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPath() @@ -175,12 +181,12 @@ public function getPath() } /** - * The path for which this policy applies, specified as a glob pattern. - * For more information on glob, see the [manual + * 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; + * Generated from protobuf field string path = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -193,16 +199,17 @@ public function setPath($var) } /** - * 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 + * 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; + * Generated from protobuf field string condition = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getCondition() @@ -211,16 +218,17 @@ public function getCondition() } /** - * 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 + * 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; + * Generated from protobuf field string condition = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -233,14 +241,14 @@ public function setCondition($var) } /** - * The actions that the caller should take regarding user access. + * 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; + * 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() @@ -249,14 +257,14 @@ public function getActions() } /** - * The actions that the caller should take regarding user access. + * 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; + * 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 */ diff --git a/RecaptchaEnterprise/src/V1/FirewallPolicyAssessment.php b/RecaptchaEnterprise/src/V1/FirewallPolicyAssessment.php index 5292d4661b1b..24ee0a582a5e 100644 --- a/RecaptchaEnterprise/src/V1/FirewallPolicyAssessment.php +++ b/RecaptchaEnterprise/src/V1/FirewallPolicyAssessment.php @@ -16,10 +16,10 @@ class FirewallPolicyAssessment extends \Google\Protobuf\Internal\Message { /** - * If the processing of a policy config fails, an error will be populated - * and the firewall_policy will be left empty. + * Output only. If the processing of a policy config fails, an error will be + * populated and the firewall_policy will be left empty. * - * Generated from protobuf field .google.rpc.Status error = 5; + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $error = null; /** @@ -38,8 +38,8 @@ class FirewallPolicyAssessment extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Rpc\Status $error - * If the processing of a policy config fails, an error will be populated - * and the firewall_policy will be left empty. + * Output only. If the processing of a policy config fails, an error will be + * populated and the firewall_policy will be 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 @@ -52,10 +52,10 @@ public function __construct($data = NULL) { } /** - * If the processing of a policy config fails, an error will be populated - * and the firewall_policy will be left empty. + * Output only. If the processing of a policy config fails, an error will be + * populated and the firewall_policy will be left empty. * - * Generated from protobuf field .google.rpc.Status error = 5; + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Rpc\Status|null */ public function getError() @@ -74,10 +74,10 @@ public function clearError() } /** - * If the processing of a policy config fails, an error will be populated - * and the firewall_policy will be left empty. + * Output only. If the processing of a policy config fails, an error will be + * populated and the firewall_policy will be left empty. * - * Generated from protobuf field .google.rpc.Status error = 5; + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Rpc\Status $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/FraudPreventionAssessment.php b/RecaptchaEnterprise/src/V1/FraudPreventionAssessment.php index 5e7bd63e3ace..e85ac2555482 100644 --- a/RecaptchaEnterprise/src/V1/FraudPreventionAssessment.php +++ b/RecaptchaEnterprise/src/V1/FraudPreventionAssessment.php @@ -16,30 +16,31 @@ class FraudPreventionAssessment extends \Google\Protobuf\Internal\Message { /** - * Probability of this transaction being fraudulent. Summarizes the combined - * risk of attack vectors below. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float transaction_risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $transaction_risk = 0.0; /** - * Assessment of this transaction for risk of a stolen instrument. + * 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; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.StolenInstrumentVerdict stolen_instrument_verdict = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $stolen_instrument_verdict = null; /** - * Assessment of this transaction for risk of being part of a card testing - * attack. + * 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; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict card_testing_verdict = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $card_testing_verdict = null; /** - * Assessment of this transaction for behavioral trust. + * Output only. Assessment of this transaction for behavioral trust. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $behavioral_trust_verdict = null; @@ -50,16 +51,17 @@ class FraudPreventionAssessment extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type float $transaction_risk - * Probability of this transaction being fraudulent. Summarizes the combined - * risk of attack vectors below. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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 - * Assessment of this transaction for risk of a stolen instrument. + * Output only. Assessment of this transaction for risk of a stolen + * instrument. * @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment\CardTestingVerdict $card_testing_verdict - * Assessment of this transaction for risk of being part of a card testing - * attack. + * 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 - * Assessment of this transaction for behavioral trust. + * Output only. Assessment of this transaction for behavioral trust. * } */ public function __construct($data = NULL) { @@ -68,11 +70,11 @@ public function __construct($data = NULL) { } /** - * Probability of this transaction being fraudulent. Summarizes the combined - * risk of attack vectors below. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float transaction_risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return float */ public function getTransactionRisk() @@ -81,11 +83,11 @@ public function getTransactionRisk() } /** - * Probability of this transaction being fraudulent. Summarizes the combined - * risk of attack vectors below. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float transaction_risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param float $var * @return $this */ @@ -98,9 +100,10 @@ public function setTransactionRisk($var) } /** - * Assessment of this transaction for risk of a stolen instrument. + * 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; + * 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() @@ -119,9 +122,10 @@ public function clearStolenInstrumentVerdict() } /** - * Assessment of this transaction for risk of a stolen instrument. + * 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; + * 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 */ @@ -134,10 +138,10 @@ public function setStolenInstrumentVerdict($var) } /** - * Assessment of this transaction for risk of being part of a card testing - * attack. + * 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; + * 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() @@ -156,10 +160,10 @@ public function clearCardTestingVerdict() } /** - * Assessment of this transaction for risk of being part of a card testing - * attack. + * 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; + * 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 */ @@ -172,9 +176,9 @@ public function setCardTestingVerdict($var) } /** - * Assessment of this transaction for behavioral trust. + * Output only. Assessment of this transaction for behavioral trust. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * 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() @@ -193,9 +197,9 @@ public function clearBehavioralTrustVerdict() } /** - * Assessment of this transaction for behavioral trust. + * Output only. Assessment of this transaction for behavioral trust. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * 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 */ diff --git a/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php b/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php index bebd7270e8b9..c8881275b303 100644 --- a/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php +++ b/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/BehavioralTrustVerdict.php @@ -16,11 +16,11 @@ class BehavioralTrustVerdict extends \Google\Protobuf\Internal\Message { /** - * Probability of this transaction attempt being executed in a behaviorally - * trustworthy way. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $trust = 0.0; @@ -31,9 +31,9 @@ class BehavioralTrustVerdict extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type float $trust - * Probability of this transaction attempt being executed in a behaviorally - * trustworthy way. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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) { @@ -42,11 +42,11 @@ public function __construct($data = NULL) { } /** - * Probability of this transaction attempt being executed in a behaviorally - * trustworthy way. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return float */ public function getTrust() @@ -55,11 +55,11 @@ public function getTrust() } /** - * Probability of this transaction attempt being executed in a behaviorally - * trustworthy way. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param float $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/CardTestingVerdict.php b/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/CardTestingVerdict.php index e540829398ba..8de3be9da216 100644 --- a/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/CardTestingVerdict.php +++ b/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/CardTestingVerdict.php @@ -17,11 +17,10 @@ class CardTestingVerdict extends \Google\Protobuf\Internal\Message { /** - * Probability of this transaction attempt being part of a card testing - * attack. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $risk = 0.0; @@ -32,9 +31,8 @@ class CardTestingVerdict extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type float $risk - * Probability of this transaction attempt being part of a card testing - * attack. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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) { @@ -43,11 +41,10 @@ public function __construct($data = NULL) { } /** - * Probability of this transaction attempt being part of a card testing - * attack. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return float */ public function getRisk() @@ -56,11 +53,10 @@ public function getRisk() } /** - * Probability of this transaction attempt being part of a card testing - * attack. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param float $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php b/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php index ce29a1c5e7c8..e16e5205d8b0 100644 --- a/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php +++ b/RecaptchaEnterprise/src/V1/FraudPreventionAssessment/StolenInstrumentVerdict.php @@ -17,10 +17,10 @@ class StolenInstrumentVerdict extends \Google\Protobuf\Internal\Message { /** - * Probability of this transaction being executed with a stolen instrument. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $risk = 0.0; @@ -31,8 +31,8 @@ class StolenInstrumentVerdict extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type float $risk - * Probability of this transaction being executed with a stolen instrument. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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) { @@ -41,10 +41,10 @@ public function __construct($data = NULL) { } /** - * Probability of this transaction being executed with a stolen instrument. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return float */ public function getRisk() @@ -53,10 +53,10 @@ public function getRisk() } /** - * Probability of this transaction being executed with a stolen instrument. - * Values are from 0.0 (lowest) to 1.0 (highest). + * 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; + * Generated from protobuf field float risk = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param float $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/IOSKeySettings.php b/RecaptchaEnterprise/src/V1/IOSKeySettings.php index a35e132ed640..b682092cc240 100644 --- a/RecaptchaEnterprise/src/V1/IOSKeySettings.php +++ b/RecaptchaEnterprise/src/V1/IOSKeySettings.php @@ -16,26 +16,26 @@ class IOSKeySettings extends \Google\Protobuf\Internal\Message { /** - * If set to true, allowed_bundle_ids are not enforced. + * Optional. If set to true, allowed_bundle_ids are not enforced. * - * Generated from protobuf field bool allow_all_bundle_ids = 2; + * Generated from protobuf field bool allow_all_bundle_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $allow_all_bundle_ids = false; /** - * iOS bundle ids of apps allowed to use the key. + * 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; + * Generated from protobuf field repeated string allowed_bundle_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $allowed_bundle_ids; /** - * Apple Developer account details for the app that is protected by the - * reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks like - * Apple App Attest and Apple DeviceCheck to protect your app from abuse. + * Optional. Apple Developer account details for the app that is protected by + * the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks + * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. * Providing these fields allows reCAPTCHA Enterprise to get a better * assessment of the integrity of your app. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $apple_developer_id = null; @@ -46,14 +46,14 @@ class IOSKeySettings extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type bool $allow_all_bundle_ids - * If set to true, allowed_bundle_ids are not enforced. + * Optional. If set to true, allowed_bundle_ids are not enforced. * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_bundle_ids - * iOS bundle ids of apps allowed to use the key. + * 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 - * Apple Developer account details for the app that is protected by the - * reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks like - * Apple App Attest and Apple DeviceCheck to protect your app from abuse. + * Optional. Apple Developer account details for the app that is protected by + * the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks + * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. * Providing these fields allows reCAPTCHA Enterprise to get a better * assessment of the integrity of your app. * } @@ -64,9 +64,9 @@ public function __construct($data = NULL) { } /** - * If set to true, allowed_bundle_ids are not enforced. + * Optional. If set to true, allowed_bundle_ids are not enforced. * - * Generated from protobuf field bool allow_all_bundle_ids = 2; + * Generated from protobuf field bool allow_all_bundle_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getAllowAllBundleIds() @@ -75,9 +75,9 @@ public function getAllowAllBundleIds() } /** - * If set to true, allowed_bundle_ids are not enforced. + * Optional. If set to true, allowed_bundle_ids are not enforced. * - * Generated from protobuf field bool allow_all_bundle_ids = 2; + * Generated from protobuf field bool allow_all_bundle_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -90,10 +90,10 @@ public function setAllowAllBundleIds($var) } /** - * iOS bundle ids of apps allowed to use the key. + * 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; + * Generated from protobuf field repeated string allowed_bundle_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getAllowedBundleIds() @@ -102,10 +102,10 @@ public function getAllowedBundleIds() } /** - * iOS bundle ids of apps allowed to use the key. + * 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; + * Generated from protobuf field repeated string allowed_bundle_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -118,13 +118,13 @@ public function setAllowedBundleIds($var) } /** - * Apple Developer account details for the app that is protected by the - * reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks like - * Apple App Attest and Apple DeviceCheck to protect your app from abuse. + * Optional. Apple Developer account details for the app that is protected by + * the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks + * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. * Providing these fields allows reCAPTCHA Enterprise to get a better * assessment of the integrity of your app. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + * 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() @@ -143,13 +143,13 @@ public function clearAppleDeveloperId() } /** - * Apple Developer account details for the app that is protected by the - * reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks like - * Apple App Attest and Apple DeviceCheck to protect your app from abuse. + * Optional. Apple Developer account details for the app that is protected by + * the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks + * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. * Providing these fields allows reCAPTCHA Enterprise to get a better * assessment of the integrity of your app. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + * 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 */ diff --git a/RecaptchaEnterprise/src/V1/Key.php b/RecaptchaEnterprise/src/V1/Key.php index 55fbd91acd6f..f3a81b391f90 100644 --- a/RecaptchaEnterprise/src/V1/Key.php +++ b/RecaptchaEnterprise/src/V1/Key.php @@ -24,16 +24,16 @@ class Key extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Human-readable display name of this key. Modifiable by user. + * Required. Human-readable display name of this key. Modifiable by user. * - * Generated from protobuf field string display_name = 2; + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $display_name = ''; /** - * See [Creating and managing labels] + * Optional. See [Creating and managing labels] * (https://cloud.google.com/recaptcha-enterprise/docs/labels). * - * Generated from protobuf field map labels = 6; + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $labels; /** @@ -43,15 +43,15 @@ class Key extends \Google\Protobuf\Internal\Message */ private $create_time = null; /** - * Options for user acceptance testing. + * Optional. Options for user acceptance testing. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9 [(.google.api.field_behavior) = OPTIONAL]; */ private $testing_options = null; /** - * Settings for WAF + * Optional. Settings for WAF * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10 [(.google.api.field_behavior) = OPTIONAL]; */ private $waf_settings = null; protected $platform_settings; @@ -66,7 +66,7 @@ class Key extends \Google\Protobuf\Internal\Message * The resource name for the Key in the format * `projects/{project}/keys/{key}`. * @type string $display_name - * Human-readable display name of this key. Modifiable by user. + * 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 @@ -74,14 +74,14 @@ class Key extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\RecaptchaEnterprise\V1\IOSKeySettings $ios_settings * Settings for keys that can be used by iOS apps. * @type array|\Google\Protobuf\Internal\MapField $labels - * See [Creating and managing labels] + * Optional. See [Creating and managing labels] * (https://cloud.google.com/recaptcha-enterprise/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 - * Options for user acceptance testing. + * Optional. Options for user acceptance testing. * @type \Google\Cloud\RecaptchaEnterprise\V1\WafSettings $waf_settings - * Settings for WAF + * Optional. Settings for WAF * } */ public function __construct($data = NULL) { @@ -118,9 +118,9 @@ public function setName($var) } /** - * Human-readable display name of this key. Modifiable by user. + * Required. Human-readable display name of this key. Modifiable by user. * - * Generated from protobuf field string display_name = 2; + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string */ public function getDisplayName() @@ -129,9 +129,9 @@ public function getDisplayName() } /** - * Human-readable display name of this key. Modifiable by user. + * Required. Human-readable display name of this key. Modifiable by user. * - * Generated from protobuf field string display_name = 2; + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ @@ -237,10 +237,10 @@ public function setIosSettings($var) } /** - * See [Creating and managing labels] + * Optional. See [Creating and managing labels] * (https://cloud.google.com/recaptcha-enterprise/docs/labels). * - * Generated from protobuf field map labels = 6; + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField */ public function getLabels() @@ -249,10 +249,10 @@ public function getLabels() } /** - * See [Creating and managing labels] + * Optional. See [Creating and managing labels] * (https://cloud.google.com/recaptcha-enterprise/docs/labels). * - * Generated from protobuf field map labels = 6; + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ @@ -301,9 +301,9 @@ public function setCreateTime($var) } /** - * Options for user acceptance testing. + * Optional. Options for user acceptance testing. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9; + * 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() @@ -322,9 +322,9 @@ public function clearTestingOptions() } /** - * Options for user acceptance testing. + * Optional. Options for user acceptance testing. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9; + * 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 */ @@ -337,9 +337,9 @@ public function setTestingOptions($var) } /** - * Settings for WAF + * Optional. Settings for WAF * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10; + * 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() @@ -358,9 +358,9 @@ public function clearWafSettings() } /** - * Settings for WAF + * Optional. Settings for WAF * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10; + * 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 */ diff --git a/RecaptchaEnterprise/src/V1/PrivatePasswordLeakVerification.php b/RecaptchaEnterprise/src/V1/PrivatePasswordLeakVerification.php index 21c1bc6b41ed..a2b3a46dc659 100644 --- a/RecaptchaEnterprise/src/V1/PrivatePasswordLeakVerification.php +++ b/RecaptchaEnterprise/src/V1/PrivatePasswordLeakVerification.php @@ -16,11 +16,11 @@ class PrivatePasswordLeakVerification extends \Google\Protobuf\Internal\Message { /** - * Optional. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized + * 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) = OPTIONAL]; + * Generated from protobuf field bytes lookup_hash_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; */ private $lookup_hash_prefix = ''; /** @@ -55,7 +55,7 @@ class PrivatePasswordLeakVerification extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $lookup_hash_prefix - * Optional. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized + * 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 @@ -78,11 +78,11 @@ public function __construct($data = NULL) { } /** - * Optional. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized + * 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) = OPTIONAL]; + * Generated from protobuf field bytes lookup_hash_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string */ public function getLookupHashPrefix() @@ -91,11 +91,11 @@ public function getLookupHashPrefix() } /** - * Optional. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized + * 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) = OPTIONAL]; + * Generated from protobuf field bytes lookup_hash_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/RiskAnalysis.php b/RecaptchaEnterprise/src/V1/RiskAnalysis.php index cc8f0efff2fd..46356d7be939 100644 --- a/RecaptchaEnterprise/src/V1/RiskAnalysis.php +++ b/RecaptchaEnterprise/src/V1/RiskAnalysis.php @@ -16,24 +16,24 @@ class RiskAnalysis extends \Google\Protobuf\Internal\Message { /** - * Legitimate event score from 0.0 to 1.0. + * 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; + * Generated from protobuf field float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $score = 0.0; /** - * Reasons contributing to the risk analysis verdict. + * Output only. Reasons contributing to the risk analysis verdict. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2; + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $reasons; /** - * Extended verdict reasons to be used for experimentation only. The set of - * possible reasons is subject to change. + * 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; + * Generated from protobuf field repeated string extended_verdict_reasons = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $extended_verdict_reasons; @@ -44,14 +44,14 @@ class RiskAnalysis extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type float $score - * Legitimate event score from 0.0 to 1.0. + * 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 - * Reasons contributing to the risk analysis verdict. + * Output only. Reasons contributing to the risk analysis verdict. * @type array|\Google\Protobuf\Internal\RepeatedField $extended_verdict_reasons - * Extended verdict reasons to be used for experimentation only. The set of - * possible reasons is subject to change. + * Output only. Extended verdict reasons to be used for experimentation only. + * The set of possible reasons is subject to change. * } */ public function __construct($data = NULL) { @@ -60,11 +60,11 @@ public function __construct($data = NULL) { } /** - * Legitimate event score from 0.0 to 1.0. + * 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; + * Generated from protobuf field float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return float */ public function getScore() @@ -73,11 +73,11 @@ public function getScore() } /** - * Legitimate event score from 0.0 to 1.0. + * 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; + * Generated from protobuf field float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param float $var * @return $this */ @@ -90,9 +90,9 @@ public function setScore($var) } /** - * Reasons contributing to the risk analysis verdict. + * Output only. Reasons contributing to the risk analysis verdict. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2; + * 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() @@ -101,9 +101,9 @@ public function getReasons() } /** - * Reasons contributing to the risk analysis verdict. + * Output only. Reasons contributing to the risk analysis verdict. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason reasons = 2; + * 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 */ @@ -116,10 +116,10 @@ public function setReasons($var) } /** - * Extended verdict reasons to be used for experimentation only. The set of - * possible reasons is subject to change. + * 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; + * Generated from protobuf field repeated string extended_verdict_reasons = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getExtendedVerdictReasons() @@ -128,10 +128,10 @@ public function getExtendedVerdictReasons() } /** - * Extended verdict reasons to be used for experimentation only. The set of - * possible reasons is subject to change. + * 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; + * 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 */ diff --git a/RecaptchaEnterprise/src/V1/TestingOptions.php b/RecaptchaEnterprise/src/V1/TestingOptions.php index 379a4d74ce4a..aeb1cae39c37 100644 --- a/RecaptchaEnterprise/src/V1/TestingOptions.php +++ b/RecaptchaEnterprise/src/V1/TestingOptions.php @@ -16,18 +16,18 @@ class TestingOptions extends \Google\Protobuf\Internal\Message { /** - * All assessments for this Key will return this score. Must be between 0 - * (likely not legitimate) and 1 (likely legitimate) inclusive. + * Optional. All assessments for this Key will return this score. Must be + * between 0 (likely not legitimate) and 1 (likely legitimate) inclusive. * - * Generated from protobuf field float testing_score = 1; + * Generated from protobuf field float testing_score = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $testing_score = 0.0; /** - * For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests - * for this site will return nocaptcha if NOCAPTCHA, or an unsolvable - * challenge if CHALLENGE. + * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all + * challenge requests for this site will return nocaptcha if NOCAPTCHA, or an + * unsolvable challenge if CHALLENGE. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $testing_challenge = 0; @@ -38,12 +38,12 @@ class TestingOptions extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type float $testing_score - * All assessments for this Key will return this score. Must be between 0 - * (likely not legitimate) and 1 (likely legitimate) inclusive. + * Optional. All assessments for this Key will return this score. Must be + * between 0 (likely not legitimate) and 1 (likely legitimate) inclusive. * @type int $testing_challenge - * For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests - * for this site will return nocaptcha if NOCAPTCHA, or an unsolvable - * challenge if CHALLENGE. + * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all + * challenge requests for this site will return nocaptcha if NOCAPTCHA, or an + * unsolvable challenge if CHALLENGE. * } */ public function __construct($data = NULL) { @@ -52,10 +52,10 @@ public function __construct($data = NULL) { } /** - * All assessments for this Key will return this score. Must be between 0 - * (likely not legitimate) and 1 (likely legitimate) inclusive. + * Optional. All assessments for this Key will return this score. Must be + * between 0 (likely not legitimate) and 1 (likely legitimate) inclusive. * - * Generated from protobuf field float testing_score = 1; + * Generated from protobuf field float testing_score = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return float */ public function getTestingScore() @@ -64,10 +64,10 @@ public function getTestingScore() } /** - * All assessments for this Key will return this score. Must be between 0 - * (likely not legitimate) and 1 (likely legitimate) inclusive. + * Optional. All assessments for this Key will return this score. Must be + * between 0 (likely not legitimate) and 1 (likely legitimate) inclusive. * - * Generated from protobuf field float testing_score = 1; + * Generated from protobuf field float testing_score = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param float $var * @return $this */ @@ -80,11 +80,11 @@ public function setTestingScore($var) } /** - * For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests - * for this site will return nocaptcha if NOCAPTCHA, or an unsolvable - * challenge if CHALLENGE. + * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all + * challenge requests for this site will return nocaptcha if NOCAPTCHA, or an + * unsolvable challenge if CHALLENGE. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getTestingChallenge() @@ -93,11 +93,11 @@ public function getTestingChallenge() } /** - * For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests - * for this site will return nocaptcha if NOCAPTCHA, or an unsolvable - * challenge if CHALLENGE. + * Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all + * challenge requests for this site will return nocaptcha if NOCAPTCHA, or an + * unsolvable challenge if CHALLENGE. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge testing_challenge = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/TokenProperties.php b/RecaptchaEnterprise/src/V1/TokenProperties.php index b45f354b37c8..66a42f3f3a4d 100644 --- a/RecaptchaEnterprise/src/V1/TokenProperties.php +++ b/RecaptchaEnterprise/src/V1/TokenProperties.php @@ -16,51 +16,52 @@ class TokenProperties extends \Google\Protobuf\Internal\Message { /** - * 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). + * 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; + * Generated from protobuf field bool valid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $valid = false; /** - * Reason associated with the response when 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; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason invalid_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $invalid_reason = 0; /** - * The timestamp corresponding to the generation of the token. + * Output only. The timestamp corresponding to the generation of the token. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $create_time = null; /** - * The hostname of the page on which the token was generated (Web keys only). + * Output only. The hostname of the page on which the token was generated (Web + * keys only). * - * Generated from protobuf field string hostname = 4; + * Generated from protobuf field string hostname = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $hostname = ''; /** - * The name of the Android package with which the token was generated (Android - * keys only). + * 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; + * Generated from protobuf field string android_package_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $android_package_name = ''; /** - * The ID of the iOS bundle with which the token was generated (iOS keys - * only). + * 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; + * Generated from protobuf field string ios_bundle_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $ios_bundle_id = ''; /** - * Action name provided at token generation. + * Output only. Action name provided at token generation. * - * Generated from protobuf field string action = 5; + * Generated from protobuf field string action = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $action = ''; @@ -71,25 +72,26 @@ class TokenProperties extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type bool $valid - * 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). + * 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 - * Reason associated with the response when valid = false. + * Output only. Reason associated with the response when valid = false. * @type \Google\Protobuf\Timestamp $create_time - * The timestamp corresponding to the generation of the token. + * Output only. The timestamp corresponding to the generation of the token. * @type string $hostname - * The hostname of the page on which the token was generated (Web keys only). - * @type string $android_package_name - * The name of the Android package with which the token was generated (Android + * 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 - * The ID of the iOS bundle with which the token was generated (iOS keys - * only). + * Output only. The ID of the iOS bundle with which the token was generated + * (iOS keys only). * @type string $action - * Action name provided at token generation. + * Output only. Action name provided at token generation. * } */ public function __construct($data = NULL) { @@ -98,13 +100,13 @@ public function __construct($data = NULL) { } /** - * 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). + * 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; + * Generated from protobuf field bool valid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return bool */ public function getValid() @@ -113,13 +115,13 @@ public function getValid() } /** - * 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). + * 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; + * Generated from protobuf field bool valid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param bool $var * @return $this */ @@ -132,9 +134,9 @@ public function setValid($var) } /** - * Reason associated with the response when 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; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason invalid_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getInvalidReason() @@ -143,9 +145,9 @@ public function getInvalidReason() } /** - * Reason associated with the response when 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; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason invalid_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ @@ -158,9 +160,9 @@ public function setInvalidReason($var) } /** - * The timestamp corresponding to the generation of the token. + * Output only. The timestamp corresponding to the generation of the token. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null */ public function getCreateTime() @@ -179,9 +181,9 @@ public function clearCreateTime() } /** - * The timestamp corresponding to the generation of the token. + * Output only. The timestamp corresponding to the generation of the token. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var * @return $this */ @@ -194,9 +196,10 @@ public function setCreateTime($var) } /** - * The hostname of the page on which the token was generated (Web keys only). + * Output only. The hostname of the page on which the token was generated (Web + * keys only). * - * Generated from protobuf field string hostname = 4; + * Generated from protobuf field string hostname = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getHostname() @@ -205,9 +208,10 @@ public function getHostname() } /** - * The hostname of the page on which the token was generated (Web keys only). + * Output only. The hostname of the page on which the token was generated (Web + * keys only). * - * Generated from protobuf field string hostname = 4; + * Generated from protobuf field string hostname = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ @@ -220,10 +224,10 @@ public function setHostname($var) } /** - * The name of the Android package with which the token was generated (Android - * keys only). + * 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; + * Generated from protobuf field string android_package_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getAndroidPackageName() @@ -232,10 +236,10 @@ public function getAndroidPackageName() } /** - * The name of the Android package with which the token was generated (Android - * keys only). + * 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; + * Generated from protobuf field string android_package_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ @@ -248,10 +252,10 @@ public function setAndroidPackageName($var) } /** - * The ID of the iOS bundle with which the token was generated (iOS keys - * only). + * 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; + * Generated from protobuf field string ios_bundle_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getIosBundleId() @@ -260,10 +264,10 @@ public function getIosBundleId() } /** - * The ID of the iOS bundle with which the token was generated (iOS keys - * only). + * 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; + * Generated from protobuf field string ios_bundle_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ @@ -276,9 +280,9 @@ public function setIosBundleId($var) } /** - * Action name provided at token generation. + * Output only. Action name provided at token generation. * - * Generated from protobuf field string action = 5; + * Generated from protobuf field string action = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getAction() @@ -287,9 +291,9 @@ public function getAction() } /** - * Action name provided at token generation. + * Output only. Action name provided at token generation. * - * Generated from protobuf field string action = 5; + * Generated from protobuf field string action = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/TransactionData.php b/RecaptchaEnterprise/src/V1/TransactionData.php index 6db049eb630e..1c8e3e81d939 100644 --- a/RecaptchaEnterprise/src/V1/TransactionData.php +++ b/RecaptchaEnterprise/src/V1/TransactionData.php @@ -10,7 +10,6 @@ /** * Transaction data associated with a payment protected by reCAPTCHA Enterprise. - * All fields are optional. * * Generated from protobuf message google.cloud.recaptchaenterprise.v1.TransactionData */ @@ -26,7 +25,7 @@ class TransactionData extends \Google\Protobuf\Internal\Message */ private $transaction_id = null; /** - * The payment method for the transaction. The allowed values are: + * Optional. The payment method for the transaction. The allowed values are: * * credit-card * * debit-card * * gift-card @@ -35,74 +34,77 @@ class TransactionData extends \Google\Protobuf\Internal\Message * * custom-{name} (If an alternative method is used, for example, * custom-crypto) * - * Generated from protobuf field string payment_method = 1; + * Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $payment_method = ''; /** - * The Bank Identification Number - generally the first 6 or 8 digits of the - * card. + * Optional. The Bank Identification Number - generally the first 6 or 8 + * digits of the card. * - * Generated from protobuf field string card_bin = 2; + * Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $card_bin = ''; /** - * The last four digits of the card. + * Optional. The last four digits of the card. * - * Generated from protobuf field string card_last_four = 3; + * Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $card_last_four = ''; /** - * The currency code in ISO-4217 format. + * Optional. The currency code in ISO-4217 format. * - * Generated from protobuf field string currency_code = 4; + * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $currency_code = ''; /** - * The decimal value of the transaction in the specified currency. + * Optional. The decimal value of the transaction in the specified currency. * - * Generated from protobuf field double value = 5; + * Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $value = 0.0; /** - * The value of shipping in the specified currency. 0 for free or no shipping. + * Optional. The value of shipping in the specified currency. 0 for free or no + * shipping. * - * Generated from protobuf field double shipping_value = 12; + * Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL]; */ private $shipping_value = 0.0; /** - * Destination address if this transaction involves shipping a physical item. + * Optional. Destination address if this transaction involves shipping a + * physical item. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $shipping_address = null; /** - * Address associated with the payment method when applicable. + * Optional. Address associated with the payment method when applicable. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL]; */ private $billing_address = null; /** - * Information about the user paying/initiating the transaction. + * Optional. Information about the user paying/initiating the transaction. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL]; */ private $user = null; /** - * Information about the user or users fulfilling the transaction. + * Optional. Information about the user or users fulfilling the transaction. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13; + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL]; */ private $merchants; /** - * Items purchased in this transaction. + * Optional. Items purchased in this transaction. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14; + * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL]; */ private $items; /** - * Information about the payment gateway's response to the transaction. + * Optional. Information about the payment gateway's response to the + * transaction. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL]; */ private $gateway_info = null; @@ -118,7 +120,7 @@ class TransactionData extends \Google\Protobuf\Internal\Message * or chargeback event. Two attempts at the same transaction should use the * same transaction id. * @type string $payment_method - * The payment method for the transaction. The allowed values are: + * Optional. The payment method for the transaction. The allowed values are: * * credit-card * * debit-card * * gift-card @@ -127,28 +129,31 @@ class TransactionData extends \Google\Protobuf\Internal\Message * * custom-{name} (If an alternative method is used, for example, * custom-crypto) * @type string $card_bin - * The Bank Identification Number - generally the first 6 or 8 digits of the - * card. + * Optional. The Bank Identification Number - generally the first 6 or 8 + * digits of the card. * @type string $card_last_four - * The last four digits of the card. + * Optional. The last four digits of the card. * @type string $currency_code - * The currency code in ISO-4217 format. + * Optional. The currency code in ISO-4217 format. * @type float $value - * The decimal value of the transaction in the specified currency. + * Optional. The decimal value of the transaction in the specified currency. * @type float $shipping_value - * The value of shipping in the specified currency. 0 for free or no shipping. + * Optional. The value of shipping in the specified currency. 0 for free or no + * shipping. * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $shipping_address - * Destination address if this transaction involves shipping a physical item. + * Optional. Destination address if this transaction involves shipping a + * physical item. * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $billing_address - * Address associated with the payment method when applicable. + * Optional. Address associated with the payment method when applicable. * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User $user - * Information about the user paying/initiating the transaction. + * Optional. Information about the user paying/initiating the transaction. * @type array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User>|\Google\Protobuf\Internal\RepeatedField $merchants - * Information about the user or users fulfilling the transaction. + * Optional. Information about the user or users fulfilling the transaction. * @type array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item>|\Google\Protobuf\Internal\RepeatedField $items - * Items purchased in this transaction. + * Optional. Items purchased in this transaction. * @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo $gateway_info - * Information about the payment gateway's response to the transaction. + * Optional. Information about the payment gateway's response to the + * transaction. * } */ public function __construct($data = NULL) { @@ -199,7 +204,7 @@ public function setTransactionId($var) } /** - * The payment method for the transaction. The allowed values are: + * Optional. The payment method for the transaction. The allowed values are: * * credit-card * * debit-card * * gift-card @@ -208,7 +213,7 @@ public function setTransactionId($var) * * custom-{name} (If an alternative method is used, for example, * custom-crypto) * - * Generated from protobuf field string payment_method = 1; + * Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPaymentMethod() @@ -217,7 +222,7 @@ public function getPaymentMethod() } /** - * The payment method for the transaction. The allowed values are: + * Optional. The payment method for the transaction. The allowed values are: * * credit-card * * debit-card * * gift-card @@ -226,7 +231,7 @@ public function getPaymentMethod() * * custom-{name} (If an alternative method is used, for example, * custom-crypto) * - * Generated from protobuf field string payment_method = 1; + * Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -239,10 +244,10 @@ public function setPaymentMethod($var) } /** - * The Bank Identification Number - generally the first 6 or 8 digits of the - * card. + * Optional. The Bank Identification Number - generally the first 6 or 8 + * digits of the card. * - * Generated from protobuf field string card_bin = 2; + * Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getCardBin() @@ -251,10 +256,10 @@ public function getCardBin() } /** - * The Bank Identification Number - generally the first 6 or 8 digits of the - * card. + * Optional. The Bank Identification Number - generally the first 6 or 8 + * digits of the card. * - * Generated from protobuf field string card_bin = 2; + * Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -267,9 +272,9 @@ public function setCardBin($var) } /** - * The last four digits of the card. + * Optional. The last four digits of the card. * - * Generated from protobuf field string card_last_four = 3; + * Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getCardLastFour() @@ -278,9 +283,9 @@ public function getCardLastFour() } /** - * The last four digits of the card. + * Optional. The last four digits of the card. * - * Generated from protobuf field string card_last_four = 3; + * Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -293,9 +298,9 @@ public function setCardLastFour($var) } /** - * The currency code in ISO-4217 format. + * Optional. The currency code in ISO-4217 format. * - * Generated from protobuf field string currency_code = 4; + * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getCurrencyCode() @@ -304,9 +309,9 @@ public function getCurrencyCode() } /** - * The currency code in ISO-4217 format. + * Optional. The currency code in ISO-4217 format. * - * Generated from protobuf field string currency_code = 4; + * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -319,9 +324,9 @@ public function setCurrencyCode($var) } /** - * The decimal value of the transaction in the specified currency. + * Optional. The decimal value of the transaction in the specified currency. * - * Generated from protobuf field double value = 5; + * Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return float */ public function getValue() @@ -330,9 +335,9 @@ public function getValue() } /** - * The decimal value of the transaction in the specified currency. + * Optional. The decimal value of the transaction in the specified currency. * - * Generated from protobuf field double value = 5; + * Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param float $var * @return $this */ @@ -345,9 +350,10 @@ public function setValue($var) } /** - * The value of shipping in the specified currency. 0 for free or no shipping. + * Optional. The value of shipping in the specified currency. 0 for free or no + * shipping. * - * Generated from protobuf field double shipping_value = 12; + * Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL]; * @return float */ public function getShippingValue() @@ -356,9 +362,10 @@ public function getShippingValue() } /** - * The value of shipping in the specified currency. 0 for free or no shipping. + * Optional. The value of shipping in the specified currency. 0 for free or no + * shipping. * - * Generated from protobuf field double shipping_value = 12; + * Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL]; * @param float $var * @return $this */ @@ -371,9 +378,10 @@ public function setShippingValue($var) } /** - * Destination address if this transaction involves shipping a physical item. + * Optional. Destination address if this transaction involves shipping a + * physical item. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6; + * 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() @@ -392,9 +400,10 @@ public function clearShippingAddress() } /** - * Destination address if this transaction involves shipping a physical item. + * Optional. Destination address if this transaction involves shipping a + * physical item. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6; + * 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 */ @@ -407,9 +416,9 @@ public function setShippingAddress($var) } /** - * Address associated with the payment method when applicable. + * Optional. Address associated with the payment method when applicable. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7; + * 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() @@ -428,9 +437,9 @@ public function clearBillingAddress() } /** - * Address associated with the payment method when applicable. + * Optional. Address associated with the payment method when applicable. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7; + * 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 */ @@ -443,9 +452,9 @@ public function setBillingAddress($var) } /** - * Information about the user paying/initiating the transaction. + * Optional. Information about the user paying/initiating the transaction. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8; + * 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() @@ -464,9 +473,9 @@ public function clearUser() } /** - * Information about the user paying/initiating the transaction. + * Optional. Information about the user paying/initiating the transaction. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8; + * 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 */ @@ -479,9 +488,9 @@ public function setUser($var) } /** - * Information about the user or users fulfilling the transaction. + * Optional. Information about the user or users fulfilling the transaction. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13; + * 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() @@ -490,9 +499,9 @@ public function getMerchants() } /** - * Information about the user or users fulfilling the transaction. + * Optional. Information about the user or users fulfilling the transaction. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13; + * 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 */ @@ -505,9 +514,9 @@ public function setMerchants($var) } /** - * Items purchased in this transaction. + * Optional. Items purchased in this transaction. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14; + * 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() @@ -516,9 +525,9 @@ public function getItems() } /** - * Items purchased in this transaction. + * Optional. Items purchased in this transaction. * - * Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14; + * 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 */ @@ -531,9 +540,10 @@ public function setItems($var) } /** - * Information about the payment gateway's response to the transaction. + * Optional. Information about the payment gateway's response to the + * transaction. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10; + * 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() @@ -552,9 +562,10 @@ public function clearGatewayInfo() } /** - * Information about the payment gateway's response to the transaction. + * Optional. Information about the payment gateway's response to the + * transaction. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10; + * 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 */ diff --git a/RecaptchaEnterprise/src/V1/TransactionData/Address.php b/RecaptchaEnterprise/src/V1/TransactionData/Address.php index c7608ebdeea1..792b05e42f4a 100644 --- a/RecaptchaEnterprise/src/V1/TransactionData/Address.php +++ b/RecaptchaEnterprise/src/V1/TransactionData/Address.php @@ -16,41 +16,43 @@ class Address extends \Google\Protobuf\Internal\Message { /** - * The recipient name, potentially including information such as "care of". + * Optional. The recipient name, potentially including information such as + * "care of". * - * Generated from protobuf field string recipient = 1; + * Generated from protobuf field string recipient = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $recipient = ''; /** - * 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. + * 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; + * Generated from protobuf field repeated string address = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $address; /** - * The town/city of the address. + * Optional. The town/city of the address. * - * Generated from protobuf field string locality = 3; + * Generated from protobuf field string locality = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $locality = ''; /** - * The state, province, or otherwise administrative area of the address. + * Optional. The state, province, or otherwise administrative area of the + * address. * - * Generated from protobuf field string administrative_area = 4; + * Generated from protobuf field string administrative_area = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $administrative_area = ''; /** - * The CLDR country/region of the address. + * Optional. The CLDR country/region of the address. * - * Generated from protobuf field string region_code = 5; + * Generated from protobuf field string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $region_code = ''; /** - * The postal or ZIP code of the address. + * Optional. The postal or ZIP code of the address. * - * Generated from protobuf field string postal_code = 6; + * Generated from protobuf field string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $postal_code = ''; @@ -61,19 +63,21 @@ class Address extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $recipient - * The recipient name, potentially including information such as "care of". + * Optional. The recipient name, potentially including information such as + * "care of". * @type array|\Google\Protobuf\Internal\RepeatedField $address - * 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. + * 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 - * The town/city of the address. + * Optional. The town/city of the address. * @type string $administrative_area - * The state, province, or otherwise administrative area of the address. + * Optional. The state, province, or otherwise administrative area of the + * address. * @type string $region_code - * The CLDR country/region of the address. + * Optional. The CLDR country/region of the address. * @type string $postal_code - * The postal or ZIP code of the address. + * Optional. The postal or ZIP code of the address. * } */ public function __construct($data = NULL) { @@ -82,9 +86,10 @@ public function __construct($data = NULL) { } /** - * The recipient name, potentially including information such as "care of". + * Optional. The recipient name, potentially including information such as + * "care of". * - * Generated from protobuf field string recipient = 1; + * Generated from protobuf field string recipient = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getRecipient() @@ -93,9 +98,10 @@ public function getRecipient() } /** - * The recipient name, potentially including information such as "care of". + * Optional. The recipient name, potentially including information such as + * "care of". * - * Generated from protobuf field string recipient = 1; + * Generated from protobuf field string recipient = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -108,11 +114,11 @@ public function setRecipient($var) } /** - * 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. + * 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; + * Generated from protobuf field repeated string address = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getAddress() @@ -121,11 +127,11 @@ public function getAddress() } /** - * 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. + * 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; + * Generated from protobuf field repeated string address = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -138,9 +144,9 @@ public function setAddress($var) } /** - * The town/city of the address. + * Optional. The town/city of the address. * - * Generated from protobuf field string locality = 3; + * Generated from protobuf field string locality = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getLocality() @@ -149,9 +155,9 @@ public function getLocality() } /** - * The town/city of the address. + * Optional. The town/city of the address. * - * Generated from protobuf field string locality = 3; + * Generated from protobuf field string locality = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -164,9 +170,10 @@ public function setLocality($var) } /** - * The state, province, or otherwise administrative area of the address. + * Optional. The state, province, or otherwise administrative area of the + * address. * - * Generated from protobuf field string administrative_area = 4; + * Generated from protobuf field string administrative_area = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getAdministrativeArea() @@ -175,9 +182,10 @@ public function getAdministrativeArea() } /** - * The state, province, or otherwise administrative area of the address. + * Optional. The state, province, or otherwise administrative area of the + * address. * - * Generated from protobuf field string administrative_area = 4; + * Generated from protobuf field string administrative_area = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -190,9 +198,9 @@ public function setAdministrativeArea($var) } /** - * The CLDR country/region of the address. + * Optional. The CLDR country/region of the address. * - * Generated from protobuf field string region_code = 5; + * Generated from protobuf field string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getRegionCode() @@ -201,9 +209,9 @@ public function getRegionCode() } /** - * The CLDR country/region of the address. + * Optional. The CLDR country/region of the address. * - * Generated from protobuf field string region_code = 5; + * Generated from protobuf field string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -216,9 +224,9 @@ public function setRegionCode($var) } /** - * The postal or ZIP code of the address. + * Optional. The postal or ZIP code of the address. * - * Generated from protobuf field string postal_code = 6; + * Generated from protobuf field string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPostalCode() @@ -227,9 +235,9 @@ public function getPostalCode() } /** - * The postal or ZIP code of the address. + * Optional. The postal or ZIP code of the address. * - * Generated from protobuf field string postal_code = 6; + * Generated from protobuf field string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/TransactionData/GatewayInfo.php b/RecaptchaEnterprise/src/V1/TransactionData/GatewayInfo.php index ae0020819fd6..b84d8315cc4d 100644 --- a/RecaptchaEnterprise/src/V1/TransactionData/GatewayInfo.php +++ b/RecaptchaEnterprise/src/V1/TransactionData/GatewayInfo.php @@ -16,29 +16,30 @@ class GatewayInfo extends \Google\Protobuf\Internal\Message { /** - * Name of the gateway service (for example, stripe, square, paypal). + * Optional. Name of the gateway service (for example, stripe, square, + * paypal). * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $name = ''; /** - * Gateway response code describing the state of the transaction. + * Optional. Gateway response code describing the state of the transaction. * - * Generated from protobuf field string gateway_response_code = 2; + * Generated from protobuf field string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $gateway_response_code = ''; /** - * AVS response code from the gateway + * 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; + * Generated from protobuf field string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $avs_response_code = ''; /** - * CVV response code from the gateway + * 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; + * Generated from protobuf field string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $cvv_response_code = ''; @@ -49,14 +50,15 @@ class GatewayInfo extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Name of the gateway service (for example, stripe, square, paypal). + * Optional. Name of the gateway service (for example, stripe, square, + * paypal). * @type string $gateway_response_code - * Gateway response code describing the state of the transaction. + * Optional. Gateway response code describing the state of the transaction. * @type string $avs_response_code - * AVS response code from the gateway + * Optional. AVS response code from the gateway * (available only when reCAPTCHA Enterprise is called after authorization). * @type string $cvv_response_code - * CVV response code from the gateway + * Optional. CVV response code from the gateway * (available only when reCAPTCHA Enterprise is called after authorization). * } */ @@ -66,9 +68,10 @@ public function __construct($data = NULL) { } /** - * Name of the gateway service (for example, stripe, square, paypal). + * Optional. Name of the gateway service (for example, stripe, square, + * paypal). * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getName() @@ -77,9 +80,10 @@ public function getName() } /** - * Name of the gateway service (for example, stripe, square, paypal). + * Optional. Name of the gateway service (for example, stripe, square, + * paypal). * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -92,9 +96,9 @@ public function setName($var) } /** - * Gateway response code describing the state of the transaction. + * Optional. Gateway response code describing the state of the transaction. * - * Generated from protobuf field string gateway_response_code = 2; + * Generated from protobuf field string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getGatewayResponseCode() @@ -103,9 +107,9 @@ public function getGatewayResponseCode() } /** - * Gateway response code describing the state of the transaction. + * Optional. Gateway response code describing the state of the transaction. * - * Generated from protobuf field string gateway_response_code = 2; + * Generated from protobuf field string gateway_response_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -118,10 +122,10 @@ public function setGatewayResponseCode($var) } /** - * AVS response code from the gateway + * 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; + * Generated from protobuf field string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getAvsResponseCode() @@ -130,10 +134,10 @@ public function getAvsResponseCode() } /** - * AVS response code from the gateway + * 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; + * Generated from protobuf field string avs_response_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -146,10 +150,10 @@ public function setAvsResponseCode($var) } /** - * CVV response code from the gateway + * 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; + * Generated from protobuf field string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getCvvResponseCode() @@ -158,10 +162,10 @@ public function getCvvResponseCode() } /** - * CVV response code from the gateway + * 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; + * Generated from protobuf field string cvv_response_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/TransactionData/Item.php b/RecaptchaEnterprise/src/V1/TransactionData/Item.php index f9ba08c87be1..c5d03db2afdc 100644 --- a/RecaptchaEnterprise/src/V1/TransactionData/Item.php +++ b/RecaptchaEnterprise/src/V1/TransactionData/Item.php @@ -16,29 +16,29 @@ class Item extends \Google\Protobuf\Internal\Message { /** - * The full name of the item. + * Optional. The full name of the item. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $name = ''; /** - * The value per item that the user is paying, in the transaction currency, - * after discounts. + * Optional. The value per item that the user is paying, in the transaction + * currency, after discounts. * - * Generated from protobuf field double value = 2; + * Generated from protobuf field double value = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $value = 0.0; /** - * The quantity of this item that is being purchased. + * Optional. The quantity of this item that is being purchased. * - * Generated from protobuf field int64 quantity = 3; + * Generated from protobuf field int64 quantity = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $quantity = 0; /** - * When a merchant is specified, its corresponding account_id. Necessary to - * populate marketplace-style transactions. + * 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; + * Generated from protobuf field string merchant_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $merchant_account_id = ''; @@ -49,15 +49,15 @@ class Item extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * The full name of the item. + * Optional. The full name of the item. * @type float $value - * The value per item that the user is paying, in the transaction currency, - * after discounts. + * Optional. The value per item that the user is paying, in the transaction + * currency, after discounts. * @type int|string $quantity - * The quantity of this item that is being purchased. + * Optional. The quantity of this item that is being purchased. * @type string $merchant_account_id - * When a merchant is specified, its corresponding account_id. Necessary to - * populate marketplace-style transactions. + * Optional. When a merchant is specified, its corresponding account_id. + * Necessary to populate marketplace-style transactions. * } */ public function __construct($data = NULL) { @@ -66,9 +66,9 @@ public function __construct($data = NULL) { } /** - * The full name of the item. + * Optional. The full name of the item. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getName() @@ -77,9 +77,9 @@ public function getName() } /** - * The full name of the item. + * Optional. The full name of the item. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -92,10 +92,10 @@ public function setName($var) } /** - * The value per item that the user is paying, in the transaction currency, - * after discounts. + * Optional. The value per item that the user is paying, in the transaction + * currency, after discounts. * - * Generated from protobuf field double value = 2; + * Generated from protobuf field double value = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return float */ public function getValue() @@ -104,10 +104,10 @@ public function getValue() } /** - * The value per item that the user is paying, in the transaction currency, - * after discounts. + * Optional. The value per item that the user is paying, in the transaction + * currency, after discounts. * - * Generated from protobuf field double value = 2; + * Generated from protobuf field double value = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param float $var * @return $this */ @@ -120,9 +120,9 @@ public function setValue($var) } /** - * The quantity of this item that is being purchased. + * Optional. The quantity of this item that is being purchased. * - * Generated from protobuf field int64 quantity = 3; + * Generated from protobuf field int64 quantity = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return int|string */ public function getQuantity() @@ -131,9 +131,9 @@ public function getQuantity() } /** - * The quantity of this item that is being purchased. + * Optional. The quantity of this item that is being purchased. * - * Generated from protobuf field int64 quantity = 3; + * Generated from protobuf field int64 quantity = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param int|string $var * @return $this */ @@ -146,10 +146,10 @@ public function setQuantity($var) } /** - * When a merchant is specified, its corresponding account_id. Necessary to - * populate marketplace-style transactions. + * 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; + * Generated from protobuf field string merchant_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getMerchantAccountId() @@ -158,10 +158,10 @@ public function getMerchantAccountId() } /** - * When a merchant is specified, its corresponding account_id. Necessary to - * populate marketplace-style transactions. + * 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; + * Generated from protobuf field string merchant_account_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/TransactionData/User.php b/RecaptchaEnterprise/src/V1/TransactionData/User.php index e13ea9258999..5e7906299b9e 100644 --- a/RecaptchaEnterprise/src/V1/TransactionData/User.php +++ b/RecaptchaEnterprise/src/V1/TransactionData/User.php @@ -16,43 +16,43 @@ class User extends \Google\Protobuf\Internal\Message { /** - * 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. + * 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; + * Generated from protobuf field string account_id = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $account_id = ''; /** - * The epoch milliseconds of the user's account creation. + * Optional. The epoch milliseconds of the user's account creation. * - * Generated from protobuf field int64 creation_ms = 1; + * Generated from protobuf field int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $creation_ms = 0; /** - * The email address of the user. + * Optional. The email address of the user. * - * Generated from protobuf field string email = 2; + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $email = ''; /** - * Whether the email has been verified to be accessible by the user (OTP or - * similar). + * Optional. Whether the email has been verified to be accessible by the + * user (OTP or similar). * - * Generated from protobuf field bool email_verified = 3; + * Generated from protobuf field bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $email_verified = false; /** - * The phone number of the user, with country code. + * Optional. The phone number of the user, with country code. * - * Generated from protobuf field string phone_number = 4; + * Generated from protobuf field string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $phone_number = ''; /** - * Whether the phone number has been verified to be accessible by the user - * (OTP or similar). + * 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; + * Generated from protobuf field bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $phone_verified = false; @@ -63,21 +63,21 @@ class User extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $account_id - * 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. + * 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 - * The epoch milliseconds of the user's account creation. + * Optional. The epoch milliseconds of the user's account creation. * @type string $email - * The email address of the user. + * Optional. The email address of the user. * @type bool $email_verified - * Whether the email has been verified to be accessible by the user (OTP or - * similar). + * Optional. Whether the email has been verified to be accessible by the + * user (OTP or similar). * @type string $phone_number - * The phone number of the user, with country code. + * Optional. The phone number of the user, with country code. * @type bool $phone_verified - * Whether the phone number has been verified to be accessible by the user - * (OTP or similar). + * Optional. Whether the phone number has been verified to be accessible by + * the user (OTP or similar). * } */ public function __construct($data = NULL) { @@ -86,11 +86,11 @@ public function __construct($data = NULL) { } /** - * 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. + * 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; + * Generated from protobuf field string account_id = 6 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getAccountId() @@ -99,11 +99,11 @@ public function getAccountId() } /** - * 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. + * 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; + * Generated from protobuf field string account_id = 6 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -116,9 +116,9 @@ public function setAccountId($var) } /** - * The epoch milliseconds of the user's account creation. + * Optional. The epoch milliseconds of the user's account creation. * - * Generated from protobuf field int64 creation_ms = 1; + * Generated from protobuf field int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return int|string */ public function getCreationMs() @@ -127,9 +127,9 @@ public function getCreationMs() } /** - * The epoch milliseconds of the user's account creation. + * Optional. The epoch milliseconds of the user's account creation. * - * Generated from protobuf field int64 creation_ms = 1; + * Generated from protobuf field int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param int|string $var * @return $this */ @@ -142,9 +142,9 @@ public function setCreationMs($var) } /** - * The email address of the user. + * Optional. The email address of the user. * - * Generated from protobuf field string email = 2; + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getEmail() @@ -153,9 +153,9 @@ public function getEmail() } /** - * The email address of the user. + * Optional. The email address of the user. * - * Generated from protobuf field string email = 2; + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -168,10 +168,10 @@ public function setEmail($var) } /** - * Whether the email has been verified to be accessible by the user (OTP or - * similar). + * Optional. Whether the email has been verified to be accessible by the + * user (OTP or similar). * - * Generated from protobuf field bool email_verified = 3; + * Generated from protobuf field bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getEmailVerified() @@ -180,10 +180,10 @@ public function getEmailVerified() } /** - * Whether the email has been verified to be accessible by the user (OTP or - * similar). + * Optional. Whether the email has been verified to be accessible by the + * user (OTP or similar). * - * Generated from protobuf field bool email_verified = 3; + * Generated from protobuf field bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -196,9 +196,9 @@ public function setEmailVerified($var) } /** - * The phone number of the user, with country code. + * Optional. The phone number of the user, with country code. * - * Generated from protobuf field string phone_number = 4; + * Generated from protobuf field string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPhoneNumber() @@ -207,9 +207,9 @@ public function getPhoneNumber() } /** - * The phone number of the user, with country code. + * Optional. The phone number of the user, with country code. * - * Generated from protobuf field string phone_number = 4; + * Generated from protobuf field string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -222,10 +222,10 @@ public function setPhoneNumber($var) } /** - * Whether the phone number has been verified to be accessible by the user - * (OTP or similar). + * 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; + * Generated from protobuf field bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getPhoneVerified() @@ -234,10 +234,10 @@ public function getPhoneVerified() } /** - * Whether the phone number has been verified to be accessible by the user - * (OTP or similar). + * 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; + * Generated from protobuf field bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/WebKeySettings.php b/RecaptchaEnterprise/src/V1/WebKeySettings.php index 4081c1b62476..e2769bf8c85e 100644 --- a/RecaptchaEnterprise/src/V1/WebKeySettings.php +++ b/RecaptchaEnterprise/src/V1/WebKeySettings.php @@ -16,25 +16,25 @@ class WebKeySettings extends \Google\Protobuf\Internal\Message { /** - * If set to true, it means allowed_domains will not be enforced. + * Optional. If set to true, it means allowed_domains will not be enforced. * - * Generated from protobuf field bool allow_all_domains = 3; + * Generated from protobuf field bool allow_all_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $allow_all_domains = false; /** - * 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. + * 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; + * Generated from protobuf field repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $allowed_domains; /** - * If set to true, the key can be used on AMP (Accelerated Mobile Pages) - * websites. This is supported only for the SCORE integration type. + * 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; + * Generated from protobuf field bool allow_amp_traffic = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $allow_amp_traffic = false; /** @@ -44,11 +44,11 @@ class WebKeySettings extends \Google\Protobuf\Internal\Message */ private $integration_type = 0; /** - * Settings for the frequency and difficulty at which this key triggers - * captcha challenges. This should only be specified for IntegrationTypes - * CHECKBOX and INVISIBLE. + * Optional. Settings for the frequency and difficulty at which this key + * triggers captcha challenges. This should only be specified for + * IntegrationTypes CHECKBOX and INVISIBLE. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $challenge_security_preference = 0; @@ -59,21 +59,21 @@ class WebKeySettings extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type bool $allow_all_domains - * If set to true, it means allowed_domains will not be enforced. + * Optional. If set to true, it means allowed_domains will not be enforced. * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_domains - * 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. + * 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 - * If set to true, the key can be used on AMP (Accelerated Mobile Pages) - * websites. This is supported only for the SCORE integration type. + * 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 - * Settings for the frequency and difficulty at which this key triggers - * captcha challenges. This should only be specified for IntegrationTypes - * CHECKBOX and INVISIBLE. + * Optional. Settings for the frequency and difficulty at which this key + * triggers captcha challenges. This should only be specified for + * IntegrationTypes CHECKBOX and INVISIBLE. * } */ public function __construct($data = NULL) { @@ -82,9 +82,9 @@ public function __construct($data = NULL) { } /** - * If set to true, it means allowed_domains will not be enforced. + * Optional. If set to true, it means allowed_domains will not be enforced. * - * Generated from protobuf field bool allow_all_domains = 3; + * Generated from protobuf field bool allow_all_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getAllowAllDomains() @@ -93,9 +93,9 @@ public function getAllowAllDomains() } /** - * If set to true, it means allowed_domains will not be enforced. + * Optional. If set to true, it means allowed_domains will not be enforced. * - * Generated from protobuf field bool allow_all_domains = 3; + * Generated from protobuf field bool allow_all_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -108,12 +108,12 @@ public function setAllowAllDomains($var) } /** - * 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. + * 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; + * Generated from protobuf field repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getAllowedDomains() @@ -122,12 +122,12 @@ public function getAllowedDomains() } /** - * 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. + * 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; + * Generated from protobuf field repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -140,10 +140,10 @@ public function setAllowedDomains($var) } /** - * If set to true, the key can be used on AMP (Accelerated Mobile Pages) - * websites. This is supported only for the SCORE integration type. + * 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; + * Generated from protobuf field bool allow_amp_traffic = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getAllowAmpTraffic() @@ -152,10 +152,10 @@ public function getAllowAmpTraffic() } /** - * If set to true, the key can be used on AMP (Accelerated Mobile Pages) - * websites. This is supported only for the SCORE integration type. + * 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; + * Generated from protobuf field bool allow_amp_traffic = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -194,11 +194,11 @@ public function setIntegrationType($var) } /** - * Settings for the frequency and difficulty at which this key triggers - * captcha challenges. This should only be specified for IntegrationTypes - * CHECKBOX and INVISIBLE. + * Optional. Settings for the frequency and difficulty at which this key + * triggers captcha challenges. This should only be specified for + * IntegrationTypes CHECKBOX and INVISIBLE. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getChallengeSecurityPreference() @@ -207,11 +207,11 @@ public function getChallengeSecurityPreference() } /** - * Settings for the frequency and difficulty at which this key triggers - * captcha challenges. This should only be specified for IntegrationTypes - * CHECKBOX and INVISIBLE. + * Optional. Settings for the frequency and difficulty at which this key + * triggers captcha challenges. This should only be specified for + * IntegrationTypes CHECKBOX and INVISIBLE. * - * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5; + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ diff --git a/RecaptchaEnterprise/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php b/RecaptchaEnterprise/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php index 8351c0914cc2..e3d812aa2fac 100644 --- a/RecaptchaEnterprise/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php +++ b/RecaptchaEnterprise/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php @@ -323,6 +323,8 @@ public function createKeyTest() // Mock request $formattedParent = $gapicClient->projectName('[PROJECT]'); $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); $request = (new CreateKeyRequest()) ->setParent($formattedParent) ->setKey($key); @@ -361,6 +363,8 @@ public function createKeyExceptionTest() // Mock request $formattedParent = $gapicClient->projectName('[PROJECT]'); $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); $request = (new CreateKeyRequest()) ->setParent($formattedParent) ->setKey($key); @@ -1276,6 +1280,8 @@ public function updateKeyTest() $transport->addResponse($expectedResponse); // Mock request $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); $request = (new UpdateKeyRequest()) ->setKey($key); $response = $gapicClient->updateKey($request); @@ -1310,6 +1316,8 @@ public function updateKeyExceptionTest() $transport->addResponse(null, $status); // Mock request $key = new Key(); + $keyDisplayName = 'keyDisplayName-302940530'; + $key->setDisplayName($keyDisplayName); $request = (new UpdateKeyRequest()) ->setKey($key); try { diff --git a/RecaptchaEnterprise/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php b/RecaptchaEnterprise/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php index 2b7c30ac45fe..fd1e28080325 100644 --- a/RecaptchaEnterprise/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php +++ b/RecaptchaEnterprise/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php @@ -287,6 +287,8 @@ public function createKeyTest() // 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(); @@ -322,6 +324,8 @@ public function createKeyExceptionTest() // 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 @@ -1182,6 +1186,8 @@ public function updateKeyTest() $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(); @@ -1214,6 +1220,8 @@ public function updateKeyExceptionTest() $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 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 3777dcf196343afc03baae86aa1240bcf189d5ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20924 zcmd5^U2GfKbq+~Mwk~anp7q)?z24={{@Gres^!gQ!(H!YNKw+n6v^d}y!NUcjL4D1 zm?9YtDMxXghay1x+5|1oAEZSP^uI4n+lS^QZ!Ll%1zMm$-G?sFB1PRk^|22{zjN=M z;S4qOj$}VH4;yRl+;h)8fA^g4p5X@{^>%ygwbZKBvHIq~YNoahQiEM9)$4Z$-A1>a z+8S^x*r`z3WTZ@f$ci3F)TMe@} zXzZF+XJGYv{g!Pl?%xP{oaQSr)-m@iyJt46)M`1qZVk+)IWRX@Inm7=5#6jDCc3$C z<9)^&ZPT_>0mJMeOW}XL;a0oVNZA8(fd6~FWgD$dYtS;=t#4w-w^G|?+qOXG@Vnc? zPGivOc2YE<)M;3kucQP`diV8S7ZSRaa@Z`B&>*l)op#+Z+ndXl-RQS^gKoc!S2LL% zYv78So?N~nmnCwo?bKz#VwKla* zr%O`kcI-@Mw5Jh?NfUGJ7F2n(IV&xz-OO6M=6;p8ixfo;;gu_cu+U%23Tp)WNo zhc3z?9u43^ix%ln4mz>L9Te2}psBH?-8Tk~I^+uu)BRp!k$h}uivjfyBJ6ywZz1++ zwr$z=9`;kQzCMI9l^mPtnSDH1h@>KyXR|jy)1v>QU1x7|`8Ye+Gdt!EBBR&=q++KL zEf--`U$YtmWsNaJCrNoB3PSOvMfvhm1)Ux-l#O9!^*hrnQR|x>+vG7RzYoro24fce z!x$X&EY9cL(pN)~A19R_e^3KOS~;S;z-AyKyW8RX&x(f%o8C9uLu(<1Jw?Q`n=Uty z|H2gCY|`PzQBK3-F4z4rM?|H5j@|9YG(c3E(t-fsFw8c(yg1xvh z$JprY#3|(^wlMk|8!K1xRWL|QCQgs7iEZaA)qG-3QP^B1zfvzQW5&nze6^OC_dIiU zoFM+idx}Jt(q_xzEV>l`VLXdv0+HoLkZz zqk3AXN>60W8Nop)4EIxZLRh#BbBRXJB&U+=v&S^!M5;vnU2ZBiz@~e7HU)O5n zI{2HLUcEp@6jc^jqO4V`cS@CIBUh?a^0`_fmW-Z^fU4q-=tXC2ipJExi^6ue7|04M zd94a3_Is}1mLp@HzQ^jUB8&~mwaxrTUgYJ5Z* z`?ByB$CcOe^@?7t>A5Nwz*)Tr`9M6&M(s|?SV2rGRT3wZ7ugvSfd6rf9V2Cy2uzd ztbS{|)!?a~-r4Rd=h@TOA(edFYQRAF*>txd+C+XBC5v+;Aa3mSyauB{^09d5WFagkK!uy3S^u_lV;d z&dyt*JYtd@gu`KPZL_m8#JO!Wx=nF}$z!d}l5J!IBu za8krc3Xj82K*->sVn~g3+)W6}LLkkMesn!d%G0(vvRjtFMt5u_3%~uS>b#WX< z=se0-Dy51TfXj~tqsr?nB?hZ{EpL>H*^*XS){Cn+j&h~-av=}TiYc$Ki{dS~x?a}l zydyeVp-{R57n)M8us6nE(6V5}DCp~Y&B%YUrq!$DZPO!maus+`4%Vy}Yxzo1E8y%@ z*~@}X4zHJRUK=0R5u-c=PK=lldlUzuk-aPY4)Fn@O%TBg%X+S6tm{=ovfNr?R{h%u zd!^iO?L(zy3?|Ur`3n=Yw_x`YFP?$D)eQUe*4elU3Ku48p>=moi=pXb@ zAseJGqtUmT$huHN+I$jMo($(#*`?9jZ7gQ&nW%*&T}zxW{N0$6X0P_G(c8haDUTBG ztABk0LETL!k-d1&S8h=svT1REh*a}xC{yLRr0|V(_8}AJ{G8mQvOmq3BdF zQgfmd0AhY#$&+q3$E7WOal!goSZtWoSiE-mK@q6RzboTT0mB+twbLJ^+eok9q^ z?4q+k)7nM|g34h%P8L7IMe^ZM)>)QhM#>Xg88Q{{2$`qRllEzFoAGVzBwuhj)PkR5 z?P7!5EV1*5oc9ms=$KR(YGj}bVzP?nNw%46## zHqQrIJ@;z`>tYHpMPYM$nB?uH0`>h2s zQc3YucJ_g}EfNQ>zGp|%6D;;M^X3AXnw*4Xb}bXGW-r8X)XS%vZyh#OiwaMk+boMog8(Dnm%b_CSIJ0#S5S)I@X7{W<@afKg0tMxj&q{KgO~YUJ?1i~!Ag6i2^>&y0Nqp%m$J+O*AVhTlC!YL4gq@I@LxMSra=g_eAkS;6@J2_8(UCVI zEVa80Am@VvuZ^bI3ubc!q%#yR%sGzXY@;_&$;FY0@kn4m^b|j1LVoZJUhjB=Cp<&cK;mq*ntTf~ zoLv~JgFIeFF3n3McOJ1X<|Vh;6lv{nDi)!*E*y|jG3kI1;Ma#RJ4b+$T?o)I$Z?QB z3gg=m7WXJJXg!s^=-3RLk{5+SrlPXo5eTu~+_w$?xaSKmY=`z1_=BJN z-56?bPvS@Wwj15PfPJE*kC=kP)J0gxp5~TTLfNvHa5_g9J#Jk)f>>h88*IV)#()yF zCRL@)R%3uY5M(LRZ7#%^`X3Q?Hi!u3znUwcj(34Jz+%C81)#waiVK1Y3H~@&FXlf1 z7D>QBzPO=RN=1&mMXA=Wl}g5XJ-226h*$xHhsx>_yWp8ouWGA#l>9X+h^nZo09v5L z0?1Na(E(cK@aRxFX&>Lp z%PgrEH?)FI@MwS?aJ}CymhKc$%zEF0O`K-4>sn!@R9Q#)8&%@$1Pny4;E$Mcl1(kw z%Xugok5Q#oQF%kR0HL#$(jBVfc_EvaQGYnaE=5f@?Rvv=K_X6FEp%IepzFzagAXIQxK|<@pT3C_D`jgFM{Emp*>RrE|!j zYJ#$F)n8-_&V>^W6Kq>xI1~$H$ytBKm7U8>vt1+V-qn-W*!c-Ep-?@hp(L_ejI}LBF7I4qIn6W=^*x2NJN<{*`X}(hLA-g z)pC+rn&jZ6oGi1rXEi`p=gDW0R5Z;4+h}(mpc>x-jxNI3w6Hl!dk;G3UBDf`!NpAs z35Q4m1&Vu?QA~s+%EQ~{mW5K0kj1&B)$rC4z&hVXf#`95)O&1}R^(6UoS=|x6trx< zFoxtI65z_Ftm(@L9{2-iNDWt12p#9y3!by0P?A?bG4)4LT)GIz^f0cV?6Mi(zN(@2 zHIZI=Y{aw2AL2L-8l{^%;O(V4aKq*NO1`*^$QHDB1U_8XtpF%D1Yj4T1CkCjJ*SuI zRijW^)r$sQ0B-0ty21l8=^1tw$stPfBRQs|*h`gsfdln&v}zRV>sfHHrmwCgrqu67 zaNkB*qjlRlc&>N785VQu_4v}|P+|uQWG_+mmm_SxfczN`?B~i968s(=lQz0tc<|>A z6QQJ;+IYzjMbF!<10!y@w?BxX3P!GTzbC!^}mvzIH@px**2 zRIql;#zECWCQrL}Hvhg5rocqf{Oa&Bdo#qMJ5p#?L@l$#vemYHTs+&x{vyII3SaQ!c#aaD zOAExuY<>)ElpDSo%0>K~32%W9UnC>-jR9MJu6!TabKt`-1#>0csL0OvB|&hwxYs(4 zEGD~GgDt@RebR9qYt`opU*?{5lidj6S$=xz??DN|EBphF5(4xtoaH!seHOpjW*3Fu z1oQda1kz_`)>}K&Na=}V&*Y$VH)Y=ksOtc0ja{oD;)TE;R5TAj)99G&w;Hbbf5oTb zC9dLY>}m)VOG4_8qbN`WQ5S0PlwoPc0NM1>c0{+nLaT?vm)q!rE~wKS5+F>J7)1ae z&@CJ~UnMZXVWtd#Vi(sIRtG1FLoLRsg=?0`IkP3j%*GR~dKB3xZv?>nbUH3R#D528)g!<8Qn;|Gm2PhjnQXVB-VSA-5@jv`8cLSWWUv1STIF$K}hsc*YI z-crkfhWJvr4ao|&B&PE7ovRSnCa!?QJ>1WQlK35S+tD8Jx1>YY=if9THI4|!0K-}6v>MsDK6RWrbfS4}T&=5yW5ooL{pa%*Voxg7h7*7%9 zSQ$MA8mcyca2PKYHnc1%8Fx}5s{UY#&H0@R*wPttM?ma0x_r1;B#gbq5@`Ri=nx{Xop*(j>Lk=8BngXE3R^l zYCeY!vD#e&)%!}m!ok`@Rsw)Gs~4zr<+XiQD^N2i76uy*0j&G$5vCjtnH>3WO~ng$ z()sBc3}Ao9VEpfR%;sHo#UA#0U7Xk*n1yJzG|XPl08rQmvO+gEt*s%y8m3xMW*2_~ zr}c+kxX0O%{kkBlk0T^44o99BJnU@XgZarxnO>xKmuC>C4V+y(x_2 z9!rc5;6gU;bXeTSWjYUl*%_RepJ`Ks2jd|v&dXAwLdgAzfo1MFEOF0^s(%;(0#BL9 zvPV`x&t+n>HEi6saGNNy`L$5Ce~4U~KgkMG{Dey0l&g9ldV~42KbXfTn5%yrWv4hP zCu=IP`7QupXvNK$MAG)|@ffB1oH>D{y97l_7cMw^nFGK?W+zz{yKciD4n6g5dsfMN z&#?H?F*m}+)de8rxVb99ft1LHKCxI{zKF1MT*FS&37%D--s17teX%6DoT4VDPo z;&rlS{*?N9+@}-iZm^T+$Ac_@^oyi2+~w66n-xjJrF#!m&TtEN7=z(JG>OJTCLd#zt1cCn_Fd4n z28QT(k@pkf`bx)XTZ1*;Hsg>^o@Q~6#OY6uxRMEU{`)qXe1j#%8Kj!8XAX8{xP-k$ zl3!x;$S}QYq3e2-RPqSyzw;J3OZGf_aoaIelY6y+hU4zG`rFZwxrzR{|+MnF`RW^anyQ65GRSp%LDPUl9K#fPIm z9;yElVJ`$oO+gPL2i-&oAw8cR)AKXme4;%#?qucGGi_b{&nSy~03)T&;?%E;EB^f! z>UY}U+|v7@f`o@mn*W=VpyM*?kln^z>k#c=r2b=)T@fTWS+&a;R+5kC`;t4_im`$l zV0@1`2Grm)$5F*zMza;_a9lc9@!br4Qd%qB&KFUQpxI*D6AIRx)lh^nr$(21@^fl^VeUvdJ zADPJ2$J#u-d`&(=da0m;c2)=Wj)vt_MiiYe4wZUWDcJgZmmDYos3qH`g#4s?>h{ia}c%|n*Vf&Dn)ly81Dqm9MSzwgt5`BuM!T28clF` z2`{`wF1#!1>w#g+vBEuZ5smPr{607w-4Tc6a5TZ;@R}p7r$RpxKT~gVF5gt1#-(#r z`pA(b@6YC~Sq{h{VS#WTK8OhGpXzXbw4z@utKQ?AcwfCdDen48b`Ih&`(3Q%%DlF~@%K90=bh71ulFe4ao%@rf zJ3NQ`HIT_vq*LAEYD_C40S(Bq1L{_(6cj(iw_<=km7TH z;L02hcE!*AU3Z#2vcC~!uj0qA97zW)v411G5Ks)4DFZ7_Xg7^Iy{1>0;9X zzbCk~2wsAJRj{}9e!!I8*7u`RtLPQ~qv&g^{FepsMHzlsFde{8dgI1VoVPaR4-k%i zfpApBZ{jBipG4mjgoogle.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 2cca8bd51573..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 hashed account ID field in Event. - * - * 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 hashed account ID field in Event. - * } - */ - 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 hashed account ID field in Event. - * - * 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 hashed account ID field in Event. - * - * 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/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 b3602b110bf1..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/AnnotateAssessmentRequest.php +++ /dev/null @@ -1,269 +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 will be 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. Optional reasons for the annotation that will be 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. Unique stable hashed user identifier to apply to the assessment. - * This is an alternative to setting the hashed_account_id in - * CreateAssessment, for example when the account identifier is not yet known - * in the initial request. It is recommended that the identifier is hashed - * using hmac-sha256 with stable secret. - * - * 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 will be 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 will be 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. Optional reasons for the annotation that will be assigned to the - * Event. - * @type string $hashed_account_id - * Optional. Unique stable hashed user identifier to apply to the assessment. - * This is an alternative to setting the hashed_account_id in - * CreateAssessment, for example when the account identifier is not yet known - * in the initial request. It is recommended that the identifier is hashed - * using hmac-sha256 with stable secret. - * @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 will be 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 will be 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. Optional reasons for the annotation that will be 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. Optional reasons for the annotation that will be 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. Unique stable hashed user identifier to apply to the assessment. - * This is an alternative to setting the hashed_account_id in - * CreateAssessment, for example when the account identifier is not yet known - * in the initial request. It is recommended that the identifier is hashed - * using hmac-sha256 with stable secret. - * - * 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. Unique stable hashed user identifier to apply to the assessment. - * This is an alternative to setting the hashed_account_id in - * CreateAssessment, for example when the account identifier is not yet known - * in the initial request. It is recommended that the identifier is hashed - * using hmac-sha256 with stable secret. - * - * 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 401ffeb40f4b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Assessment.php +++ /dev/null @@ -1,495 +0,0 @@ -google.cloud.recaptchaenterprise.v1.Assessment - */ -class Assessment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. 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]; - */ - 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 a - * hashed_account_id 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; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. 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 a - * hashed_account_id 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. 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]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. 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]; - * @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 a - * hashed_account_id 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 a - * hashed_account_id 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; - } - -} - 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 a2a2e8eee258..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 will be 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 will be 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 will be 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 will be 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 will be 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 6c21ea7f41fb..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 will apply 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 will apply 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 will apply 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 will apply 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 will apply 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 25ea7e47cad9..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 will be 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 will be 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 will be 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 will be 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 will be 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 40cc39f11760..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Event.php +++ /dev/null @@ -1,545 +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]; - */ - 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. 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 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $hashed_account_id = ''; - /** - * Optional. Flag for a reCAPTCHA express request for an assessment without a - * token. If enabled, `site_key` must reference a SCORE key with WAF feature - * set to EXPRESS. - * - * 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 will be evaluated and a - * suggested firewall action will be 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; - - /** - * 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. 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 a SCORE key with WAF feature - * set to EXPRESS. - * @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 will be evaluated and a - * suggested firewall action will be 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. - * } - */ - 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]; - * @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]; - * @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. 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 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getHashedAccountId() - { - return $this->hashed_account_id; - } - - /** - * Optional. 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 [(.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. Flag for a reCAPTCHA express request for an assessment without a - * token. If enabled, `site_key` must reference a SCORE key with WAF feature - * set to EXPRESS. - * - * 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 a SCORE key with WAF feature - * set to EXPRESS. - * - * 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 will be evaluated and a - * suggested firewall action will be 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 will be evaluated and a - * suggested firewall action will be 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; - } - -} - 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 9be6d77d7dbd..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction.php +++ /dev/null @@ -1,223 +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 will deny access to a given page. The user will get an HTTP - * error code. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\RedirectAction $redirect - * This action will redirect the request to a ReCaptcha interstitial to - * attach a token. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SubstituteAction $substitute - * This action will transparently serve a different page to an offending - * user. - * @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallAction\SetHeaderAction $set_header - * This action will set 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 will deny access to a given page. The user will get 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 will deny access to a given page. The user will get 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 will redirect 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 will redirect 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 will transparently serve 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 will transparently serve 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 will set 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 will set 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/RedirectAction.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/FirewallAction/RedirectAction.php deleted file mode 100644 index 6151c5b27f83..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 054a37930f49..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 -{ - /** - * The resource name for the FirewallPolicy in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * Generated from protobuf field string name = 1; - */ - 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 - * 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); - } - - /** - * The resource name for the FirewallPolicy in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the FirewallPolicy in the format - * `projects/{project}/firewallpolicies/{firewallpolicy}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * 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 99ff43d3979e..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 will be - * populated and the firewall_policy will be 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 will be 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 will be - * populated and the firewall_policy will be 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 will be 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 will be - * populated and the firewall_policy will be 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 will be - * populated and the firewall_policy will be 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 will be 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 will be 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 f1fe5348973b..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 Enterprise leverages platform-specific checks - * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. - * Providing these fields allows reCAPTCHA Enterprise 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 Enterprise leverages platform-specific checks - * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. - * Providing these fields allows reCAPTCHA Enterprise 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 Enterprise leverages platform-specific checks - * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. - * Providing these fields allows reCAPTCHA Enterprise 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 Enterprise leverages platform-specific checks - * like Apple App Attest and Apple DeviceCheck to protect your app from abuse. - * Providing these fields allows reCAPTCHA Enterprise 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/Key.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php deleted file mode 100644 index a4d9c909af12..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/Key.php +++ /dev/null @@ -1,384 +0,0 @@ -google.cloud.recaptchaenterprise.v1.Key - */ -class Key extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the Key in the format - * `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1; - */ - 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-enterprise/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 - * 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 array|\Google\Protobuf\Internal\MapField $labels - * Optional. See [Creating and managing labels] - * (https://cloud.google.com/recaptcha-enterprise/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); - } - - /** - * The resource name for the Key in the format - * `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the Key in the format - * `projects/{project}/keys/{key}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * 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; - } - - /** - * Optional. See [Creating and managing labels] - * (https://cloud.google.com/recaptcha-enterprise/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-enterprise/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 463227847d0f..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/ListKeysRequest.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/ListKeysRequest.php deleted file mode 100644 index a8d195ff3e5e..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 will be - * 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 will be - * 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 will be - * 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 will be - * 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 will be - * 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 bcc89c6e721e..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. The name of the metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * - * Generated from protobuf field string name = 4 [(.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 will be 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 will be continuous and in order by dates, and in the granularity - * of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will 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. 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 will be 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 will be continuous and in order by dates, and in the granularity - * of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will have - * challenge-based data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the metrics, in the format - * `projects/{project}/keys/{key}/metrics`. - * - * Generated from protobuf field string name = 4 [(.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 will be 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 will be 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 will be continuous and in order by dates, and in the granularity - * of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will 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 will be continuous and in order by dates, and in the granularity - * of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will 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 741b84b1ae2f..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-enterprise/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-enterprise/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-enterprise/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-enterprise/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-enterprise/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-enterprise/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-enterprise/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-enterprise/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/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 9e571e94f437..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroup.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RelatedAccountGroup - */ -class RelatedAccountGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. 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) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. 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. 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) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. 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) = 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/RelatedAccountGroupMembership.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php deleted file mode 100644 index 03e59e0b795b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RelatedAccountGroupMembership.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership - */ -class RelatedAccountGroupMembership extends \Google\Protobuf\Internal\Message -{ - /** - * Required. 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) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The unique stable hashed user 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; - */ - protected $hashed_account_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for this membership in the format - * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. - * @type string $hashed_account_id - * The unique stable hashed user 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. 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) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. 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) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The unique stable hashed user 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; - * @return string - */ - public function getHashedAccountId() - { - return $this->hashed_account_id; - } - - /** - * The unique stable hashed user 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; - * @param string $var - * @return $this - */ - public function setHashedAccountId($var) - { - 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/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 9bf44caebfc0..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/RiskAnalysis.php +++ /dev/null @@ -1,147 +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; - - /** - * 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. - * } - */ - 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; - } - -} - 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 fc401b9b1dbe..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/SearchRelatedAccountGroupMembershipsRequest.php +++ /dev/null @@ -1,233 +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 hashed user identifier used to search - * connections. The identifier should correspond to a `hashed_account_id` - * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. - * - * Generated from protobuf field bytes hashed_account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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::relatedAccountGroupName()} for help formatting this field. - * @param string $hashedAccountId Optional. The unique stable hashed user identifier used to search - * connections. The identifier should correspond to a `hashed_account_id` - * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. - * - * @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 $hashed_account_id - * Optional. The unique stable hashed user identifier used to search - * connections. The identifier should correspond to a `hashed_account_id` - * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. - * @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 hashed user identifier used to search - * connections. The identifier should correspond to a `hashed_account_id` - * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. - * - * Generated from protobuf field bytes hashed_account_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getHashedAccountId() - { - return $this->hashed_account_id; - } - - /** - * Optional. The unique stable hashed user identifier used to search - * connections. The identifier should correspond to a `hashed_account_id` - * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. - * - * Generated from protobuf field bytes hashed_account_id = 2 [(.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. 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/TestingOptions.php b/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/TestingOptions.php deleted file mode 100644 index 754d0ea2cbf3..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 will 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 will 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 will 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 will 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 will 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 will 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 will 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 will 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 68b29bada6af..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 will be 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 will be 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 will be 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 will be 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 will be 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 4b1f342c10d2..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 will be 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 will be 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 will be 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 will be 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 will be 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/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 8971ae15d176..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 b89f29a25f53..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/proto/src/Google/Cloud/RecaptchaEnterprise/V1/WafSettings/WafService.php +++ /dev/null @@ -1,64 +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; - - private static $valueToName = [ - self::WAF_SERVICE_UNSPECIFIED => 'WAF_SERVICE_UNSPECIFIED', - self::CA => 'CA', - self::FASTLY => 'FASTLY', - ]; - - 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 c546cb45fcf4..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 will not be 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. - * - * 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 will not be 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If set to true, it means allowed_domains will not be 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 will not be 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. - * - * 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. - * - * 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/annotate_assessment.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php deleted file mode 100644 index d36307bd057b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/annotate_assessment.php +++ /dev/null @@ -1,73 +0,0 @@ -annotateAssessment($formattedName, $annotation); - 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 23223805303b..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_assessment.php +++ /dev/null @@ -1,70 +0,0 @@ -createAssessment($formattedParent, $assessment); - 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 e7d88e842616..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_firewall_policy.php +++ /dev/null @@ -1,75 +0,0 @@ -createFirewallPolicy( - $formattedParent, - $firewallPolicy - ); - 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 9491a9c3e64e..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/create_key.php +++ /dev/null @@ -1,73 +0,0 @@ -setDisplayName($keyDisplayName); - - // Call the API and handle any network failures. - try { - /** @var Key $response */ - $response = $recaptchaEnterpriseServiceClient->createKey($formattedParent, $key); - 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 abf2ab495135..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_firewall_policy.php +++ /dev/null @@ -1,68 +0,0 @@ -deleteFirewallPolicy($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 c3713e62b35a..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/delete_key.php +++ /dev/null @@ -1,65 +0,0 @@ -deleteKey($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 e268c35843a8..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_firewall_policy.php +++ /dev/null @@ -1,70 +0,0 @@ -getFirewallPolicy($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 2b2c189cce17..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_key.php +++ /dev/null @@ -1,67 +0,0 @@ -getKey($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 6db489596c6e..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/get_metrics.php +++ /dev/null @@ -1,68 +0,0 @@ -getMetrics($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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 8b8cd5a81717..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_firewall_policies.php +++ /dev/null @@ -1,72 +0,0 @@ -listFirewallPolicies($formattedParent); - - /** @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_keys.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php deleted file mode 100644 index 1a095fdd94de..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_keys.php +++ /dev/null @@ -1,72 +0,0 @@ -listKeys($formattedParent); - - /** @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 c106e495cc03..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_group_memberships.php +++ /dev/null @@ -1,75 +0,0 @@ -listRelatedAccountGroupMemberships($formattedParent); - - /** @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 a9995d7767e3..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/list_related_account_groups.php +++ /dev/null @@ -1,72 +0,0 @@ -listRelatedAccountGroups($formattedParent); - - /** @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 de94d6626c1a..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/migrate_key.php +++ /dev/null @@ -1,72 +0,0 @@ -migrateKey($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = 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/retrieve_legacy_secret_key.php b/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php deleted file mode 100644 index 9141cfc6e5f0..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/retrieve_legacy_secret_key.php +++ /dev/null @@ -1,69 +0,0 @@ -retrieveLegacySecretKey($formattedKey); - 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 068e311d1518..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/search_related_account_group_memberships.php +++ /dev/null @@ -1,78 +0,0 @@ -searchRelatedAccountGroupMemberships( - $formattedProject - ); - - /** @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::relatedAccountGroupName( - '[PROJECT]', - '[RELATEDACCOUNTGROUP]' - ); - - 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 72e18aa7f6df..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_firewall_policy.php +++ /dev/null @@ -1,56 +0,0 @@ -updateFirewallPolicy($firewallPolicy); - 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 aab6a7ea5ca5..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/samples/V1/RecaptchaEnterpriseServiceClient/update_key.php +++ /dev/null @@ -1,69 +0,0 @@ -setDisplayName($keyDisplayName); - - // Call the API and handle any network failures. - try { - /** @var Key $response */ - $response = $recaptchaEnterpriseServiceClient->updateKey($key); - 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 759b20393081..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Client/RecaptchaEnterpriseServiceClient.php +++ /dev/null @@ -1,792 +0,0 @@ - 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); - } - - /** - * 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()} . - * - * @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()} . - * - * @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()} . - * - * @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()} . - * - * @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()} . - * - * @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()} . - * - * @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()} . - * - * @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()} . - * - * @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()} - * . - * - * @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()} . - * - * @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); - } - - /** - * Returns the list of all keys that belong to a project. - * - * The async variant is {@see RecaptchaEnterpriseServiceClient::listKeysAsync()} . - * - * @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()} - * . - * - * @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()} . - * - * @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()} - * . - * - * @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(); - } - - /** - * 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()} . - * - * @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()} - * . - * - * @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()} . - * - * @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()} . - * - * @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 c7c9f524608f..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php +++ /dev/null @@ -1,1371 +0,0 @@ -assessmentName('[PROJECT]', '[ASSESSMENT]'); - * $annotation = Annotation::ANNOTATION_UNSPECIFIED; - * $response = $recaptchaEnterpriseServiceClient->annotateAssessment($formattedName, $annotation); - * } 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. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\RecaptchaEnterprise\V1\Client\RecaptchaEnterpriseServiceClient} to - * use the new surface. - */ -class RecaptchaEnterpriseServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'recaptchaenterprise.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $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); - } - - /** - * 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 will be 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. Optional reasons for the annotation that will be assigned to the - * Event. - * For allowed values, use constants defined on {@see \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Reason} - * @type string $hashedAccountId - * Optional. Unique stable hashed user identifier to apply to the assessment. - * This is an alternative to setting the hashed_account_id in - * CreateAssessment, for example when the account identifier is not yet known - * in the initial request. It is recommended that the identifier is hashed - * using hmac-sha256 with stable secret. - * @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['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 will be 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 will apply 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 will be 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); - } - - /** - * 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 will be - * 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-enterprise/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-enterprise/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(); - } - - /** - * 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - * // 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 $hashedAccountId - * Optional. The unique stable hashed user identifier used to search - * connections. The identifier should correspond to a `hashed_account_id` - * provided in a previous `CreateAssessment` or `AnnotateAssessment` call. - * @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['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 will be updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\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 will be updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\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 529005a6c0fd..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/RecaptchaEnterpriseServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' => [ - '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', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - '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 be34edbcc6f1..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php +++ /dev/null @@ -1,217 +0,0 @@ - [ - 'google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService' => [ - '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', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - '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 e3d812aa2fac..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php +++ /dev/null @@ -1,1366 +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 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 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 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - $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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - $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 annotateAssessmentAsyncTest() - { - $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->annotateAssessmentAsync($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/AnnotateAssessment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getAnnotation(); - $this->assertProtobufEquals($annotation, $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 5e9d83fa4168..000000000000 --- a/owl-bot-staging/RecaptchaEnterprise/v1/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php +++ /dev/null @@ -1,1237 +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 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 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 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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - $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->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); - 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()); - } -}