From 3e9bd057c7e7a613c8b5c25d69ee42a9d969d034 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:00:03 -0400 Subject: [PATCH] feat: [recaptchaenterprise] FirewallPolicy CRUD API (#9937) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: added FraudPreventionAssessment.behavioral_trust_verdict docs: formatting of resource names chore: remove backend configuration from the service config PiperOrigin-RevId: 570683260 Source-Link: https://github.com/googleapis/googleapis/commit/b027b019374cf2ae5fcdeebf75cc17cd9d7c2e50 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c97a9e88043caae796c6340451088773c1d70cdc Copy-Tag: eyJwIjoiamF2YS1yZWNhcHRjaGFlbnRlcnByaXNlLy5Pd2xCb3QueWFtbCIsImgiOiJjOTdhOWU4ODA0M2NhYWU3OTZjNjM0MDQ1MTA4ODc3M2MxZDcwY2RjIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: FirewallPolicy CRUD API feat: added Assessment.firewall_policy_assessment, fraud_signals feat: added new fields to Event message feat: added RiskAnalysis.extended_verdict_reasons feat: added FraudPreventionAssessment.behavioral_trust_verdict feat: added AndroidKeySettings.support_non_google_app_store_distribution feat: added IOSKeySettings.apple_developer_id feat: added WafFeature.EXPRESS enum value feat: added WafService.FASTLY enum value chore: remove backend configuration from the service config PiperOrigin-RevId: 570747007 Source-Link: https://github.com/googleapis/googleapis/commit/726e33e077155b454555e91af721b76e90d56912 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4e53991b7315853fbd6b275c604ec38530527f83 Copy-Tag: eyJwIjoiamF2YS1yZWNhcHRjaGFlbnRlcnByaXNlLy5Pd2xCb3QueWFtbCIsImgiOiI0ZTUzOTkxYjczMTU4NTNmYmQ2YjI3NWM2MDRlYzM4NTMwNTI3ZjgzIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-recaptchaenterprise/README.md | 4 +- .../v1/RecaptchaEnterpriseServiceClient.java | 792 ++- .../RecaptchaEnterpriseServiceSettings.java | 76 + .../v1/gapic_metadata.json | 15 + .../GrpcRecaptchaEnterpriseServiceStub.java | 191 + .../stub/RecaptchaEnterpriseServiceStub.java | 34 + ...ecaptchaEnterpriseServiceStubSettings.java | 211 + ...captchaEnterpriseServiceV1Beta1Client.java | 8 +- .../reflect-config.json | 387 ++ .../reflect-config.json | 18 + .../MockRecaptchaEnterpriseServiceImpl.java | 113 + .../RecaptchaEnterpriseServiceClientTest.java | 398 ++ .../v1/RecaptchaEnterpriseServiceGrpc.java | 651 ++- .../v1/AccountVerificationInfo.java | 14 +- .../v1/AccountVerificationInfoOrBuilder.java | 4 +- .../v1/AndroidKeySettings.java | 102 + .../v1/AndroidKeySettingsOrBuilder.java | 14 + .../v1/AnnotateAssessmentRequest.java | 14 +- .../AnnotateAssessmentRequestOrBuilder.java | 4 +- .../v1/AppleDeveloperId.java | 1023 ++++ .../v1/AppleDeveloperIdOrBuilder.java | 110 + .../recaptchaenterprise/v1/Assessment.java | 648 ++- .../v1/AssessmentOrBuilder.java | 93 +- .../v1/CreateAssessmentRequest.java | 14 +- .../v1/CreateAssessmentRequestOrBuilder.java | 4 +- .../v1/CreateFirewallPolicyRequest.java | 941 ++++ .../CreateFirewallPolicyRequestOrBuilder.java | 97 + .../v1/CreateKeyRequest.java | 14 +- .../v1/CreateKeyRequestOrBuilder.java | 4 +- .../v1/DeleteFirewallPolicyRequest.java | 650 +++ .../DeleteFirewallPolicyRequestOrBuilder.java | 56 + .../v1/DeleteKeyRequest.java | 14 +- .../v1/DeleteKeyRequestOrBuilder.java | 4 +- .../google/recaptchaenterprise/v1/Event.java | 1068 +++- .../v1/EventOrBuilder.java | 146 + .../v1/FirewallAction.java | 4978 +++++++++++++++++ .../v1/FirewallActionOrBuilder.java | 225 + .../v1/FirewallPolicy.java | 1868 +++++++ .../v1/FirewallPolicyAssessment.java | 1020 ++++ .../v1/FirewallPolicyAssessmentOrBuilder.java | 110 + .../v1/FirewallPolicyName.java | 192 + .../v1/FirewallPolicyOrBuilder.java | 226 + .../v1/FraudPreventionAssessment.java | 1107 +++- .../FraudPreventionAssessmentOrBuilder.java | 48 +- .../recaptchaenterprise/v1/FraudSignals.java | 2850 ++++++++++ .../v1/FraudSignalsOrBuilder.java | 110 + .../v1/GetFirewallPolicyRequest.java | 646 +++ .../v1/GetFirewallPolicyRequestOrBuilder.java | 56 + .../recaptchaenterprise/v1/GetKeyRequest.java | 14 +- .../v1/GetKeyRequestOrBuilder.java | 4 +- .../v1/GetMetricsRequest.java | 14 +- .../v1/GetMetricsRequestOrBuilder.java | 4 +- .../v1/IOSKeySettings.java | 318 ++ .../v1/IOSKeySettingsOrBuilder.java | 47 + .../google/recaptchaenterprise/v1/Key.java | 82 +- .../recaptchaenterprise/v1/KeyOrBuilder.java | 30 +- .../v1/ListFirewallPoliciesRequest.java | 936 ++++ .../ListFirewallPoliciesRequestOrBuilder.java | 97 + .../v1/ListFirewallPoliciesResponse.java | 1169 ++++ ...ListFirewallPoliciesResponseOrBuilder.java | 109 + .../v1/ListKeysRequest.java | 14 +- .../v1/ListKeysRequestOrBuilder.java | 4 +- .../v1/ListRelatedAccountGroupsRequest.java | 14 +- ...tRelatedAccountGroupsRequestOrBuilder.java | 4 +- .../recaptchaenterprise/v1/Metrics.java | 14 +- .../v1/MetricsOrBuilder.java | 4 +- .../v1/MigrateKeyRequest.java | 14 +- .../v1/MigrateKeyRequestOrBuilder.java | 4 +- .../v1/RecaptchaEnterpriseProto.java | 1176 ++-- .../v1/RetrieveLegacySecretKeyRequest.java | 14 +- ...trieveLegacySecretKeyRequestOrBuilder.java | 4 +- .../recaptchaenterprise/v1/RiskAnalysis.java | 293 + .../v1/RiskAnalysisOrBuilder.java | 55 + ...RelatedAccountGroupMembershipsRequest.java | 30 +- ...countGroupMembershipsRequestOrBuilder.java | 8 +- .../v1/UpdateFirewallPolicyRequest.java | 1021 ++++ .../UpdateFirewallPolicyRequestOrBuilder.java | 107 + .../recaptchaenterprise/v1/WafSettings.java | 46 + .../v1/recaptchaenterprise.proto | 426 +- .../v1beta1/AnnotateAssessmentRequest.java | 14 +- .../AnnotateAssessmentRequestOrBuilder.java | 4 +- .../v1beta1/Assessment.java | 14 +- .../v1beta1/AssessmentOrBuilder.java | 4 +- .../v1beta1/CreateAssessmentRequest.java | 14 +- .../CreateAssessmentRequestOrBuilder.java | 4 +- .../v1beta1/FraudPreventionAssessment.java | 927 +++ .../FraudPreventionAssessmentOrBuilder.java | 43 + .../v1beta1/RecaptchaEnterpriseProto.java | 93 +- .../v1beta1/recaptchaenterprise.proto | 16 +- .../AsyncCreateFirewallPolicy.java | 52 + .../SyncCreateFirewallPolicy.java | 48 + ...rewallPolicyProjectnameFirewallpolicy.java | 45 + ...ateFirewallPolicyStringFirewallpolicy.java | 45 + .../AsyncDeleteFirewallPolicy.java | 51 + .../SyncDeleteFirewallPolicy.java | 47 + ...eleteFirewallPolicyFirewallpolicyname.java | 43 + .../SyncDeleteFirewallPolicyString.java | 43 + .../AsyncGetFirewallPolicy.java | 51 + .../SyncGetFirewallPolicy.java | 47 + ...ncGetFirewallPolicyFirewallpolicyname.java | 43 + .../SyncGetFirewallPolicyString.java | 43 + .../AsyncListFirewallPolicies.java | 55 + .../AsyncListFirewallPoliciesPaged.java | 63 + .../SyncListFirewallPolicies.java | 52 + .../SyncListFirewallPoliciesProjectname.java | 46 + .../SyncListFirewallPoliciesString.java | 46 + .../AsyncUpdateFirewallPolicy.java | 52 + .../SyncUpdateFirewallPolicy.java | 48 + ...FirewallPolicyFirewallpolicyFieldmask.java | 45 + 109 files changed, 28643 insertions(+), 903 deletions(-) create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AppleDeveloperId.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AppleDeveloperIdOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateFirewallPolicyRequest.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateFirewallPolicyRequestOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteFirewallPolicyRequest.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteFirewallPolicyRequestOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallAction.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallActionOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicy.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyAssessment.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyAssessmentOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyName.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudSignals.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudSignalsOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetFirewallPolicyRequest.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetFirewallPolicyRequestOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesRequest.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesRequestOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesResponse.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesResponseOrBuilder.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/UpdateFirewallPolicyRequest.java create mode 100644 java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/UpdateFirewallPolicyRequestOrBuilder.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/AsyncCreateFirewallPolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicyProjectnameFirewallpolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicyStringFirewallpolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/AsyncDeleteFirewallPolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicyFirewallpolicyname.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicyString.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/AsyncGetFirewallPolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicyFirewallpolicyname.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicyString.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/AsyncListFirewallPolicies.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/AsyncListFirewallPoliciesPaged.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPolicies.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPoliciesProjectname.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPoliciesString.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/AsyncUpdateFirewallPolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/SyncUpdateFirewallPolicy.java create mode 100644 java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/SyncUpdateFirewallPolicyFirewallpolicyFieldmask.java diff --git a/java-recaptchaenterprise/README.md b/java-recaptchaenterprise/README.md index 82fad26b8642..b22c93dc95bf 100644 --- a/java-recaptchaenterprise/README.md +++ b/java-recaptchaenterprise/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.24.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-recaptchaenterprise.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recaptchaenterprise/3.21.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recaptchaenterprise/3.24.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClient.java b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClient.java index 364b6e20ab81..f96f2f3b1647 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClient.java +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClient.java @@ -35,12 +35,19 @@ import com.google.recaptchaenterprise.v1.Assessment; import com.google.recaptchaenterprise.v1.AssessmentName; import com.google.recaptchaenterprise.v1.CreateAssessmentRequest; +import com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.CreateKeyRequest; +import com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.DeleteKeyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; +import com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.GetKeyRequest; import com.google.recaptchaenterprise.v1.GetMetricsRequest; import com.google.recaptchaenterprise.v1.Key; import com.google.recaptchaenterprise.v1.KeyName; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse; import com.google.recaptchaenterprise.v1.ListKeysRequest; import com.google.recaptchaenterprise.v1.ListKeysResponse; import com.google.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest; @@ -58,6 +65,7 @@ import com.google.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse; +import com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.UpdateKeyRequest; import java.io.IOException; import java.util.List; @@ -217,7 +225,7 @@ public RecaptchaEnterpriseServiceStub getStub() { * } * * @param parent Required. The name of the project in which the assessment will be created, in the - * format "projects/{project}". + * format `projects/{project}`. * @param assessment Required. The assessment details. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -251,7 +259,7 @@ public final Assessment createAssessment(ProjectName parent, Assessment assessme * } * * @param parent Required. The name of the project in which the assessment will be created, in the - * format "projects/{project}". + * format `projects/{project}`. * @param assessment Required. The assessment details. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -345,7 +353,7 @@ public final UnaryCallable createAssessment * } * * @param name Required. The resource name of the Assessment, in the format - * "projects/{project}/assessments/{assessment}". + * `projects/{project}/assessments/{assessment}`. * @param 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. @@ -385,7 +393,7 @@ public final AnnotateAssessmentResponse annotateAssessment( * } * * @param name Required. The resource name of the Assessment, in the format - * "projects/{project}/assessments/{assessment}". + * `projects/{project}/assessments/{assessment}`. * @param 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. @@ -487,7 +495,7 @@ public final AnnotateAssessmentResponse annotateAssessment(AnnotateAssessmentReq * } * * @param parent Required. The name of the project in which the key will be created, in the format - * "projects/{project}". + * `projects/{project}`. * @param key Required. Information to create a reCAPTCHA Enterprise key. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -521,7 +529,7 @@ public final Key createKey(ProjectName parent, Key key) { * } * * @param parent Required. The name of the project in which the key will be created, in the format - * "projects/{project}". + * `projects/{project}`. * @param key Required. Information to create a reCAPTCHA Enterprise key. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -612,7 +620,7 @@ public final UnaryCallable createKeyCallable() { * } * * @param parent Required. The name of the project that contains the keys that will be listed, in - * the format "projects/{project}". + * the format `projects/{project}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListKeysPagedResponse listKeys(ProjectName parent) { @@ -643,7 +651,7 @@ public final ListKeysPagedResponse listKeys(ProjectName parent) { * } * * @param parent Required. The name of the project that contains the keys that will be listed, in - * the format "projects/{project}". + * the format `projects/{project}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListKeysPagedResponse listKeys(String parent) { @@ -779,7 +787,7 @@ public final UnaryCallable listKeysCallable() * } * * @param key Required. The public key name linked to the requested secret key in the format - * "projects/{project}/keys/{key}". + * `projects/{project}/keys/{key}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final RetrieveLegacySecretKeyResponse retrieveLegacySecretKey(KeyName key) { @@ -812,7 +820,7 @@ public final RetrieveLegacySecretKeyResponse retrieveLegacySecretKey(KeyName key * } * * @param key Required. The public key name linked to the requested secret key in the format - * "projects/{project}/keys/{key}". + * `projects/{project}/keys/{key}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final RetrieveLegacySecretKeyResponse retrieveLegacySecretKey(String key) { @@ -904,7 +912,7 @@ public final RetrieveLegacySecretKeyResponse retrieveLegacySecretKey( * } * * @param name Required. The name of the requested key, in the format - * "projects/{project}/keys/{key}". + * `projects/{project}/keys/{key}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Key getKey(KeyName name) { @@ -933,7 +941,7 @@ public final Key getKey(KeyName name) { * } * * @param name Required. The name of the requested key, in the format - * "projects/{project}/keys/{key}". + * `projects/{project}/keys/{key}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Key getKey(String name) { @@ -1105,7 +1113,7 @@ public final UnaryCallable updateKeyCallable() { * } * * @param name Required. The name of the key to be deleted, in the format - * "projects/{project}/keys/{key}". + * `projects/{project}/keys/{key}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteKey(KeyName name) { @@ -1134,7 +1142,7 @@ public final void deleteKey(KeyName name) { * } * * @param name Required. The name of the key to be deleted, in the format - * "projects/{project}/keys/{key}". + * `projects/{project}/keys/{key}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteKey(String name) { @@ -1204,8 +1212,8 @@ public final UnaryCallable deleteKeyCallable() { /** * 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 Site Key, and your user must - * have the reCAPTCHA Enterprise Admin IAM role in the destination project. + * 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: * @@ -1237,8 +1245,8 @@ public final Key migrateKey(MigrateKeyRequest 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 Site Key, and your user must - * have the reCAPTCHA Enterprise Admin IAM role in the destination project. + * 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: * @@ -1286,7 +1294,7 @@ public final UnaryCallable migrateKeyCallable() { * } * * @param name Required. The name of the requested metrics, in the format - * "projects/{project}/keys/{key}/metrics". + * `projects/{project}/keys/{key}/metrics`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Metrics getMetrics(MetricsName name) { @@ -1315,7 +1323,7 @@ public final Metrics getMetrics(MetricsName name) { * } * * @param name Required. The name of the requested metrics, in the format - * "projects/{project}/keys/{key}/metrics". + * `projects/{project}/keys/{key}/metrics`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Metrics getMetrics(String name) { @@ -1381,6 +1389,650 @@ public final UnaryCallable getMetricsCallable() { return stub.getMetricsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build();
+   *   FirewallPolicy response =
+   *       recaptchaEnterpriseServiceClient.createFirewallPolicy(parent, firewallPolicy);
+   * }
+   * }
+ * + * @param parent Required. The name of the project this policy will apply to, in the format + * `projects/{project}`. + * @param firewallPolicy Required. Information to create the policy. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirewallPolicy createFirewallPolicy( + ProjectName parent, FirewallPolicy firewallPolicy) { + CreateFirewallPolicyRequest request = + CreateFirewallPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFirewallPolicy(firewallPolicy) + .build(); + return createFirewallPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build();
+   *   FirewallPolicy response =
+   *       recaptchaEnterpriseServiceClient.createFirewallPolicy(parent, firewallPolicy);
+   * }
+   * }
+ * + * @param parent Required. The name of the project this policy will apply to, in the format + * `projects/{project}`. + * @param firewallPolicy Required. Information to create the policy. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirewallPolicy createFirewallPolicy(String parent, FirewallPolicy firewallPolicy) { + CreateFirewallPolicyRequest request = + CreateFirewallPolicyRequest.newBuilder() + .setParent(parent) + .setFirewallPolicy(firewallPolicy) + .build(); + return createFirewallPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   CreateFirewallPolicyRequest request =
+   *       CreateFirewallPolicyRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFirewallPolicy(FirewallPolicy.newBuilder().build())
+   *           .build();
+   *   FirewallPolicy response = recaptchaEnterpriseServiceClient.createFirewallPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirewallPolicy createFirewallPolicy(CreateFirewallPolicyRequest request) { + return createFirewallPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   CreateFirewallPolicyRequest request =
+   *       CreateFirewallPolicyRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFirewallPolicy(FirewallPolicy.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       recaptchaEnterpriseServiceClient.createFirewallPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   FirewallPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createFirewallPolicyCallable() { + return stub.createFirewallPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all firewall policies that belong to a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (FirewallPolicy element :
+   *       recaptchaEnterpriseServiceClient.listFirewallPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFirewallPoliciesPagedResponse listFirewallPolicies(ProjectName parent) { + ListFirewallPoliciesRequest request = + ListFirewallPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listFirewallPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all firewall policies that belong to a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   for (FirewallPolicy element :
+   *       recaptchaEnterpriseServiceClient.listFirewallPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the project to list the policies for, in the format + * `projects/{project}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFirewallPoliciesPagedResponse listFirewallPolicies(String parent) { + ListFirewallPoliciesRequest request = + ListFirewallPoliciesRequest.newBuilder().setParent(parent).build(); + return listFirewallPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all firewall policies that belong to a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   ListFirewallPoliciesRequest request =
+   *       ListFirewallPoliciesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (FirewallPolicy element :
+   *       recaptchaEnterpriseServiceClient.listFirewallPolicies(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFirewallPoliciesPagedResponse listFirewallPolicies( + ListFirewallPoliciesRequest request) { + return listFirewallPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all firewall policies that belong to a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   ListFirewallPoliciesRequest request =
+   *       ListFirewallPoliciesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       recaptchaEnterpriseServiceClient.listFirewallPoliciesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (FirewallPolicy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFirewallPoliciesPagedCallable() { + return stub.listFirewallPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the list of all firewall policies that belong to a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   ListFirewallPoliciesRequest request =
+   *       ListFirewallPoliciesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListFirewallPoliciesResponse response =
+   *         recaptchaEnterpriseServiceClient.listFirewallPoliciesCallable().call(request);
+   *     for (FirewallPolicy element : response.getFirewallPoliciesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listFirewallPoliciesCallable() { + return stub.listFirewallPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   FirewallPolicyName name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]");
+   *   FirewallPolicy response = recaptchaEnterpriseServiceClient.getFirewallPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the requested policy, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirewallPolicy getFirewallPolicy(FirewallPolicyName name) { + GetFirewallPolicyRequest request = + GetFirewallPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getFirewallPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   String name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString();
+   *   FirewallPolicy response = recaptchaEnterpriseServiceClient.getFirewallPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the requested policy, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirewallPolicy getFirewallPolicy(String name) { + GetFirewallPolicyRequest request = GetFirewallPolicyRequest.newBuilder().setName(name).build(); + return getFirewallPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   GetFirewallPolicyRequest request =
+   *       GetFirewallPolicyRequest.newBuilder()
+   *           .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString())
+   *           .build();
+   *   FirewallPolicy response = recaptchaEnterpriseServiceClient.getFirewallPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirewallPolicy getFirewallPolicy(GetFirewallPolicyRequest request) { + return getFirewallPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   GetFirewallPolicyRequest request =
+   *       GetFirewallPolicyRequest.newBuilder()
+   *           .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       recaptchaEnterpriseServiceClient.getFirewallPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   FirewallPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getFirewallPolicyCallable() { + return stub.getFirewallPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   FirewallPolicy response =
+   *       recaptchaEnterpriseServiceClient.updateFirewallPolicy(firewallPolicy, updateMask);
+   * }
+   * }
+ * + * @param firewallPolicy Required. The policy to update. + * @param updateMask Optional. The mask to control which fields of the policy get updated. If the + * mask is not present, all fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirewallPolicy updateFirewallPolicy( + FirewallPolicy firewallPolicy, FieldMask updateMask) { + UpdateFirewallPolicyRequest request = + UpdateFirewallPolicyRequest.newBuilder() + .setFirewallPolicy(firewallPolicy) + .setUpdateMask(updateMask) + .build(); + return updateFirewallPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   UpdateFirewallPolicyRequest request =
+   *       UpdateFirewallPolicyRequest.newBuilder()
+   *           .setFirewallPolicy(FirewallPolicy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   FirewallPolicy response = recaptchaEnterpriseServiceClient.updateFirewallPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FirewallPolicy updateFirewallPolicy(UpdateFirewallPolicyRequest request) { + return updateFirewallPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   UpdateFirewallPolicyRequest request =
+   *       UpdateFirewallPolicyRequest.newBuilder()
+   *           .setFirewallPolicy(FirewallPolicy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       recaptchaEnterpriseServiceClient.updateFirewallPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   FirewallPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateFirewallPolicyCallable() { + return stub.updateFirewallPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   FirewallPolicyName name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]");
+   *   recaptchaEnterpriseServiceClient.deleteFirewallPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the policy to be deleted, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFirewallPolicy(FirewallPolicyName name) { + DeleteFirewallPolicyRequest request = + DeleteFirewallPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteFirewallPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   String name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString();
+   *   recaptchaEnterpriseServiceClient.deleteFirewallPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the policy to be deleted, in the format + * `projects/{project}/firewallpolicies/{firewallpolicy}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFirewallPolicy(String name) { + DeleteFirewallPolicyRequest request = + DeleteFirewallPolicyRequest.newBuilder().setName(name).build(); + deleteFirewallPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   DeleteFirewallPolicyRequest request =
+   *       DeleteFirewallPolicyRequest.newBuilder()
+   *           .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString())
+   *           .build();
+   *   recaptchaEnterpriseServiceClient.deleteFirewallPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFirewallPolicy(DeleteFirewallPolicyRequest request) { + deleteFirewallPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified firewall policy. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
+   *     RecaptchaEnterpriseServiceClient.create()) {
+   *   DeleteFirewallPolicyRequest request =
+   *       DeleteFirewallPolicyRequest.newBuilder()
+   *           .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       recaptchaEnterpriseServiceClient.deleteFirewallPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFirewallPolicyCallable() { + return stub.deleteFirewallPolicyCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List groups of related accounts. @@ -1404,7 +2056,7 @@ public final UnaryCallable getMetricsCallable() { * } * * @param parent Required. The name of the project to list related account groups from, in the - * format "projects/{project}". + * format `projects/{project}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListRelatedAccountGroupsPagedResponse listRelatedAccountGroups(ProjectName parent) { @@ -1438,7 +2090,7 @@ public final ListRelatedAccountGroupsPagedResponse listRelatedAccountGroups(Proj * } * * @param parent Required. The name of the project to list related account groups from, in the - * format "projects/{project}". + * format `projects/{project}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListRelatedAccountGroupsPagedResponse listRelatedAccountGroups(String parent) { @@ -1782,9 +2434,9 @@ public final ListRelatedAccountGroupMembershipsPagedResponse listRelatedAccountG * } * * @param 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 hashedAccountId Optional. The unique stable hashed user identifier we should search - * connections to. The identifier should correspond to a `hashed_account_id` provided in a + * from. Specify the project name in the following format: `projects/{project}`. + * @param 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. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1825,9 +2477,9 @@ public final ListRelatedAccountGroupMembershipsPagedResponse listRelatedAccountG * } * * @param 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 hashedAccountId Optional. The unique stable hashed user identifier we should search - * connections to. The identifier should correspond to a `hashed_account_id` provided in a + * from. Specify the project name in the following format: `projects/{project}`. + * @param 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. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2060,6 +2712,90 @@ protected ListKeysFixedSizeCollection createCollection( } } + public static class ListFirewallPoliciesPagedResponse + extends AbstractPagedListResponse< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + FirewallPolicy, + ListFirewallPoliciesPage, + ListFirewallPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListFirewallPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListFirewallPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListFirewallPoliciesPagedResponse(ListFirewallPoliciesPage page) { + super(page, ListFirewallPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListFirewallPoliciesPage + extends AbstractPage< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + FirewallPolicy, + ListFirewallPoliciesPage> { + + private ListFirewallPoliciesPage( + PageContext + context, + ListFirewallPoliciesResponse response) { + super(context, response); + } + + private static ListFirewallPoliciesPage createEmptyPage() { + return new ListFirewallPoliciesPage(null, null); + } + + @Override + protected ListFirewallPoliciesPage createPage( + PageContext + context, + ListFirewallPoliciesResponse response) { + return new ListFirewallPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListFirewallPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + FirewallPolicy, + ListFirewallPoliciesPage, + ListFirewallPoliciesFixedSizeCollection> { + + private ListFirewallPoliciesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListFirewallPoliciesFixedSizeCollection createEmptyCollection() { + return new ListFirewallPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected ListFirewallPoliciesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListFirewallPoliciesFixedSizeCollection(pages, collectionSize); + } + } + public static class ListRelatedAccountGroupsPagedResponse extends AbstractPagedListResponse< ListRelatedAccountGroupsRequest, diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceSettings.java b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceSettings.java index e9aca5840592..366dfd02fc2c 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceSettings.java +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.recaptchaenterprise.v1; +import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListFirewallPoliciesPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListKeysPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupMembershipsPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupsPagedResponse; @@ -38,11 +39,17 @@ import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse; import com.google.recaptchaenterprise.v1.Assessment; import com.google.recaptchaenterprise.v1.CreateAssessmentRequest; +import com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.CreateKeyRequest; +import com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.DeleteKeyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.GetKeyRequest; import com.google.recaptchaenterprise.v1.GetMetricsRequest; import com.google.recaptchaenterprise.v1.Key; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse; import com.google.recaptchaenterprise.v1.ListKeysRequest; import com.google.recaptchaenterprise.v1.ListKeysResponse; import com.google.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest; @@ -55,6 +62,7 @@ import com.google.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse; +import com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.UpdateKeyRequest; import java.io.IOException; import java.util.List; @@ -158,6 +166,41 @@ public UnaryCallSettings getMetricsSettings() { return ((RecaptchaEnterpriseServiceStubSettings) getStubSettings()).getMetricsSettings(); } + /** Returns the object with the settings used for calls to createFirewallPolicy. */ + public UnaryCallSettings + createFirewallPolicySettings() { + return ((RecaptchaEnterpriseServiceStubSettings) getStubSettings()) + .createFirewallPolicySettings(); + } + + /** Returns the object with the settings used for calls to listFirewallPolicies. */ + public PagedCallSettings< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + ListFirewallPoliciesPagedResponse> + listFirewallPoliciesSettings() { + return ((RecaptchaEnterpriseServiceStubSettings) getStubSettings()) + .listFirewallPoliciesSettings(); + } + + /** Returns the object with the settings used for calls to getFirewallPolicy. */ + public UnaryCallSettings getFirewallPolicySettings() { + return ((RecaptchaEnterpriseServiceStubSettings) getStubSettings()).getFirewallPolicySettings(); + } + + /** Returns the object with the settings used for calls to updateFirewallPolicy. */ + public UnaryCallSettings + updateFirewallPolicySettings() { + return ((RecaptchaEnterpriseServiceStubSettings) getStubSettings()) + .updateFirewallPolicySettings(); + } + + /** Returns the object with the settings used for calls to deleteFirewallPolicy. */ + public UnaryCallSettings deleteFirewallPolicySettings() { + return ((RecaptchaEnterpriseServiceStubSettings) getStubSettings()) + .deleteFirewallPolicySettings(); + } + /** Returns the object with the settings used for calls to listRelatedAccountGroups. */ public PagedCallSettings< ListRelatedAccountGroupsRequest, @@ -343,6 +386,39 @@ public UnaryCallSettings.Builder getMetricsSettings( return getStubSettingsBuilder().getMetricsSettings(); } + /** Returns the builder for the settings used for calls to createFirewallPolicy. */ + public UnaryCallSettings.Builder + createFirewallPolicySettings() { + return getStubSettingsBuilder().createFirewallPolicySettings(); + } + + /** Returns the builder for the settings used for calls to listFirewallPolicies. */ + public PagedCallSettings.Builder< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + ListFirewallPoliciesPagedResponse> + listFirewallPoliciesSettings() { + return getStubSettingsBuilder().listFirewallPoliciesSettings(); + } + + /** Returns the builder for the settings used for calls to getFirewallPolicy. */ + public UnaryCallSettings.Builder + getFirewallPolicySettings() { + return getStubSettingsBuilder().getFirewallPolicySettings(); + } + + /** Returns the builder for the settings used for calls to updateFirewallPolicy. */ + public UnaryCallSettings.Builder + updateFirewallPolicySettings() { + return getStubSettingsBuilder().updateFirewallPolicySettings(); + } + + /** Returns the builder for the settings used for calls to deleteFirewallPolicy. */ + public UnaryCallSettings.Builder + deleteFirewallPolicySettings() { + return getStubSettingsBuilder().deleteFirewallPolicySettings(); + } + /** Returns the builder for the settings used for calls to listRelatedAccountGroups. */ public PagedCallSettings.Builder< ListRelatedAccountGroupsRequest, diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/gapic_metadata.json b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/gapic_metadata.json index df3dfb6e5c21..3b63836b1b9b 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/gapic_metadata.json +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/gapic_metadata.json @@ -16,18 +16,30 @@ "CreateAssessment": { "methods": ["createAssessment", "createAssessment", "createAssessment", "createAssessmentCallable"] }, + "CreateFirewallPolicy": { + "methods": ["createFirewallPolicy", "createFirewallPolicy", "createFirewallPolicy", "createFirewallPolicyCallable"] + }, "CreateKey": { "methods": ["createKey", "createKey", "createKey", "createKeyCallable"] }, + "DeleteFirewallPolicy": { + "methods": ["deleteFirewallPolicy", "deleteFirewallPolicy", "deleteFirewallPolicy", "deleteFirewallPolicyCallable"] + }, "DeleteKey": { "methods": ["deleteKey", "deleteKey", "deleteKey", "deleteKeyCallable"] }, + "GetFirewallPolicy": { + "methods": ["getFirewallPolicy", "getFirewallPolicy", "getFirewallPolicy", "getFirewallPolicyCallable"] + }, "GetKey": { "methods": ["getKey", "getKey", "getKey", "getKeyCallable"] }, "GetMetrics": { "methods": ["getMetrics", "getMetrics", "getMetrics", "getMetricsCallable"] }, + "ListFirewallPolicies": { + "methods": ["listFirewallPolicies", "listFirewallPolicies", "listFirewallPolicies", "listFirewallPoliciesPagedCallable", "listFirewallPoliciesCallable"] + }, "ListKeys": { "methods": ["listKeys", "listKeys", "listKeys", "listKeysPagedCallable", "listKeysCallable"] }, @@ -46,6 +58,9 @@ "SearchRelatedAccountGroupMemberships": { "methods": ["searchRelatedAccountGroupMemberships", "searchRelatedAccountGroupMemberships", "searchRelatedAccountGroupMemberships", "searchRelatedAccountGroupMembershipsPagedCallable", "searchRelatedAccountGroupMembershipsCallable"] }, + "UpdateFirewallPolicy": { + "methods": ["updateFirewallPolicy", "updateFirewallPolicy", "updateFirewallPolicyCallable"] + }, "UpdateKey": { "methods": ["updateKey", "updateKey", "updateKeyCallable"] } diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/GrpcRecaptchaEnterpriseServiceStub.java b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/GrpcRecaptchaEnterpriseServiceStub.java index d7e67bad8136..a4ed107dc478 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/GrpcRecaptchaEnterpriseServiceStub.java +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/GrpcRecaptchaEnterpriseServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.recaptchaenterprise.v1.stub; +import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListFirewallPoliciesPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListKeysPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupMembershipsPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupsPagedResponse; @@ -34,11 +35,17 @@ import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse; import com.google.recaptchaenterprise.v1.Assessment; import com.google.recaptchaenterprise.v1.CreateAssessmentRequest; +import com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.CreateKeyRequest; +import com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.DeleteKeyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.GetKeyRequest; import com.google.recaptchaenterprise.v1.GetMetricsRequest; import com.google.recaptchaenterprise.v1.Key; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse; import com.google.recaptchaenterprise.v1.ListKeysRequest; import com.google.recaptchaenterprise.v1.ListKeysResponse; import com.google.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest; @@ -51,6 +58,7 @@ import com.google.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse; +import com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.UpdateKeyRequest; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; @@ -167,6 +175,62 @@ public class GrpcRecaptchaEnterpriseServiceStub extends RecaptchaEnterpriseServi .setResponseMarshaller(ProtoUtils.marshaller(Metrics.getDefaultInstance())) .build(); + private static final MethodDescriptor + createFirewallPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateFirewallPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateFirewallPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FirewallPolicy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listFirewallPoliciesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListFirewallPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller(ListFirewallPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListFirewallPoliciesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFirewallPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetFirewallPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFirewallPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FirewallPolicy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFirewallPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateFirewallPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFirewallPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(FirewallPolicy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteFirewallPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteFirewallPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteFirewallPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor< ListRelatedAccountGroupsRequest, ListRelatedAccountGroupsResponse> listRelatedAccountGroupsMethodDescriptor = @@ -230,6 +294,16 @@ public class GrpcRecaptchaEnterpriseServiceStub extends RecaptchaEnterpriseServi private final UnaryCallable deleteKeyCallable; private final UnaryCallable migrateKeyCallable; private final UnaryCallable getMetricsCallable; + private final UnaryCallable + createFirewallPolicyCallable; + private final UnaryCallable + listFirewallPoliciesCallable; + private final UnaryCallable + listFirewallPoliciesPagedCallable; + private final UnaryCallable getFirewallPolicyCallable; + private final UnaryCallable + updateFirewallPolicyCallable; + private final UnaryCallable deleteFirewallPolicyCallable; private final UnaryCallable listRelatedAccountGroupsCallable; private final UnaryCallable< @@ -400,6 +474,61 @@ protected GrpcRecaptchaEnterpriseServiceStub( return builder.build(); }) .build(); + GrpcCallSettings + createFirewallPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFirewallPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listFirewallPoliciesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFirewallPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getFirewallPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFirewallPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateFirewallPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFirewallPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "firewall_policy.name", + String.valueOf(request.getFirewallPolicy().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteFirewallPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFirewallPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listRelatedAccountGroupsTransportSettings = GrpcCallSettings @@ -481,6 +610,36 @@ protected GrpcRecaptchaEnterpriseServiceStub( this.getMetricsCallable = callableFactory.createUnaryCallable( getMetricsTransportSettings, settings.getMetricsSettings(), clientContext); + this.createFirewallPolicyCallable = + callableFactory.createUnaryCallable( + createFirewallPolicyTransportSettings, + settings.createFirewallPolicySettings(), + clientContext); + this.listFirewallPoliciesCallable = + callableFactory.createUnaryCallable( + listFirewallPoliciesTransportSettings, + settings.listFirewallPoliciesSettings(), + clientContext); + this.listFirewallPoliciesPagedCallable = + callableFactory.createPagedCallable( + listFirewallPoliciesTransportSettings, + settings.listFirewallPoliciesSettings(), + clientContext); + this.getFirewallPolicyCallable = + callableFactory.createUnaryCallable( + getFirewallPolicyTransportSettings, + settings.getFirewallPolicySettings(), + clientContext); + this.updateFirewallPolicyCallable = + callableFactory.createUnaryCallable( + updateFirewallPolicyTransportSettings, + settings.updateFirewallPolicySettings(), + clientContext); + this.deleteFirewallPolicyCallable = + callableFactory.createUnaryCallable( + deleteFirewallPolicyTransportSettings, + settings.deleteFirewallPolicySettings(), + clientContext); this.listRelatedAccountGroupsCallable = callableFactory.createUnaryCallable( listRelatedAccountGroupsTransportSettings, @@ -577,6 +736,38 @@ public UnaryCallable getMetricsCallable() { return getMetricsCallable; } + @Override + public UnaryCallable createFirewallPolicyCallable() { + return createFirewallPolicyCallable; + } + + @Override + public UnaryCallable + listFirewallPoliciesCallable() { + return listFirewallPoliciesCallable; + } + + @Override + public UnaryCallable + listFirewallPoliciesPagedCallable() { + return listFirewallPoliciesPagedCallable; + } + + @Override + public UnaryCallable getFirewallPolicyCallable() { + return getFirewallPolicyCallable; + } + + @Override + public UnaryCallable updateFirewallPolicyCallable() { + return updateFirewallPolicyCallable; + } + + @Override + public UnaryCallable deleteFirewallPolicyCallable() { + return deleteFirewallPolicyCallable; + } + @Override public UnaryCallable listRelatedAccountGroupsCallable() { diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/RecaptchaEnterpriseServiceStub.java b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/RecaptchaEnterpriseServiceStub.java index 7506b05a07a9..843897463492 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/RecaptchaEnterpriseServiceStub.java +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/RecaptchaEnterpriseServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.recaptchaenterprise.v1.stub; +import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListFirewallPoliciesPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListKeysPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupMembershipsPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupsPagedResponse; @@ -28,11 +29,17 @@ import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse; import com.google.recaptchaenterprise.v1.Assessment; import com.google.recaptchaenterprise.v1.CreateAssessmentRequest; +import com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.CreateKeyRequest; +import com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.DeleteKeyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.GetKeyRequest; import com.google.recaptchaenterprise.v1.GetMetricsRequest; import com.google.recaptchaenterprise.v1.Key; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse; import com.google.recaptchaenterprise.v1.ListKeysRequest; import com.google.recaptchaenterprise.v1.ListKeysResponse; import com.google.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest; @@ -45,6 +52,7 @@ import com.google.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse; +import com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.UpdateKeyRequest; import javax.annotation.Generated; @@ -103,6 +111,32 @@ public UnaryCallable getMetricsCallable() { throw new UnsupportedOperationException("Not implemented: getMetricsCallable()"); } + public UnaryCallable createFirewallPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: createFirewallPolicyCallable()"); + } + + public UnaryCallable + listFirewallPoliciesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listFirewallPoliciesPagedCallable()"); + } + + public UnaryCallable + listFirewallPoliciesCallable() { + throw new UnsupportedOperationException("Not implemented: listFirewallPoliciesCallable()"); + } + + public UnaryCallable getFirewallPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getFirewallPolicyCallable()"); + } + + public UnaryCallable updateFirewallPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: updateFirewallPolicyCallable()"); + } + + public UnaryCallable deleteFirewallPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFirewallPolicyCallable()"); + } + public UnaryCallable listRelatedAccountGroupsPagedCallable() { throw new UnsupportedOperationException( diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/RecaptchaEnterpriseServiceStubSettings.java b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/RecaptchaEnterpriseServiceStubSettings.java index 7d073c31b9ec..c680b69b6298 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/RecaptchaEnterpriseServiceStubSettings.java +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1/stub/RecaptchaEnterpriseServiceStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.recaptchaenterprise.v1.stub; +import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListFirewallPoliciesPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListKeysPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupMembershipsPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupsPagedResponse; @@ -52,11 +53,17 @@ import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse; import com.google.recaptchaenterprise.v1.Assessment; import com.google.recaptchaenterprise.v1.CreateAssessmentRequest; +import com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.CreateKeyRequest; +import com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.DeleteKeyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.GetKeyRequest; import com.google.recaptchaenterprise.v1.GetMetricsRequest; import com.google.recaptchaenterprise.v1.Key; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse; import com.google.recaptchaenterprise.v1.ListKeysRequest; import com.google.recaptchaenterprise.v1.ListKeysResponse; import com.google.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest; @@ -71,6 +78,7 @@ import com.google.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse; +import com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.UpdateKeyRequest; import java.io.IOException; import java.util.List; @@ -136,6 +144,18 @@ public class RecaptchaEnterpriseServiceStubSettings private final UnaryCallSettings deleteKeySettings; private final UnaryCallSettings migrateKeySettings; private final UnaryCallSettings getMetricsSettings; + private final UnaryCallSettings + createFirewallPolicySettings; + private final PagedCallSettings< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + ListFirewallPoliciesPagedResponse> + listFirewallPoliciesSettings; + private final UnaryCallSettings + getFirewallPolicySettings; + private final UnaryCallSettings + updateFirewallPolicySettings; + private final UnaryCallSettings deleteFirewallPolicySettings; private final PagedCallSettings< ListRelatedAccountGroupsRequest, ListRelatedAccountGroupsResponse, @@ -188,6 +208,46 @@ public Iterable extractResources(ListKeysResponse payload) { } }; + private static final PagedListDescriptor< + ListFirewallPoliciesRequest, ListFirewallPoliciesResponse, FirewallPolicy> + LIST_FIREWALL_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListFirewallPoliciesRequest, ListFirewallPoliciesResponse, FirewallPolicy>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListFirewallPoliciesRequest injectToken( + ListFirewallPoliciesRequest payload, String token) { + return ListFirewallPoliciesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListFirewallPoliciesRequest injectPageSize( + ListFirewallPoliciesRequest payload, int pageSize) { + return ListFirewallPoliciesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListFirewallPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListFirewallPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListFirewallPoliciesResponse payload) { + return payload.getFirewallPoliciesList() == null + ? ImmutableList.of() + : payload.getFirewallPoliciesList(); + } + }; + private static final PagedListDescriptor< ListRelatedAccountGroupsRequest, ListRelatedAccountGroupsResponse, RelatedAccountGroup> LIST_RELATED_ACCOUNT_GROUPS_PAGE_STR_DESC = @@ -349,6 +409,29 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + ListFirewallPoliciesPagedResponse> + LIST_FIREWALL_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + ListFirewallPoliciesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListFirewallPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_FIREWALL_POLICIES_PAGE_STR_DESC, request, context); + return ListFirewallPoliciesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListRelatedAccountGroupsRequest, ListRelatedAccountGroupsResponse, @@ -497,6 +580,37 @@ public UnaryCallSettings getMetricsSettings() { return getMetricsSettings; } + /** Returns the object with the settings used for calls to createFirewallPolicy. */ + public UnaryCallSettings + createFirewallPolicySettings() { + return createFirewallPolicySettings; + } + + /** Returns the object with the settings used for calls to listFirewallPolicies. */ + public PagedCallSettings< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + ListFirewallPoliciesPagedResponse> + listFirewallPoliciesSettings() { + return listFirewallPoliciesSettings; + } + + /** Returns the object with the settings used for calls to getFirewallPolicy. */ + public UnaryCallSettings getFirewallPolicySettings() { + return getFirewallPolicySettings; + } + + /** Returns the object with the settings used for calls to updateFirewallPolicy. */ + public UnaryCallSettings + updateFirewallPolicySettings() { + return updateFirewallPolicySettings; + } + + /** Returns the object with the settings used for calls to deleteFirewallPolicy. */ + public UnaryCallSettings deleteFirewallPolicySettings() { + return deleteFirewallPolicySettings; + } + /** Returns the object with the settings used for calls to listRelatedAccountGroups. */ public PagedCallSettings< ListRelatedAccountGroupsRequest, @@ -611,6 +725,11 @@ protected RecaptchaEnterpriseServiceStubSettings(Builder settingsBuilder) throws deleteKeySettings = settingsBuilder.deleteKeySettings().build(); migrateKeySettings = settingsBuilder.migrateKeySettings().build(); getMetricsSettings = settingsBuilder.getMetricsSettings().build(); + createFirewallPolicySettings = settingsBuilder.createFirewallPolicySettings().build(); + listFirewallPoliciesSettings = settingsBuilder.listFirewallPoliciesSettings().build(); + getFirewallPolicySettings = settingsBuilder.getFirewallPolicySettings().build(); + updateFirewallPolicySettings = settingsBuilder.updateFirewallPolicySettings().build(); + deleteFirewallPolicySettings = settingsBuilder.deleteFirewallPolicySettings().build(); listRelatedAccountGroupsSettings = settingsBuilder.listRelatedAccountGroupsSettings().build(); listRelatedAccountGroupMembershipsSettings = settingsBuilder.listRelatedAccountGroupMembershipsSettings().build(); @@ -638,6 +757,19 @@ public static class Builder private final UnaryCallSettings.Builder deleteKeySettings; private final UnaryCallSettings.Builder migrateKeySettings; private final UnaryCallSettings.Builder getMetricsSettings; + private final UnaryCallSettings.Builder + createFirewallPolicySettings; + private final PagedCallSettings.Builder< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + ListFirewallPoliciesPagedResponse> + listFirewallPoliciesSettings; + private final UnaryCallSettings.Builder + getFirewallPolicySettings; + private final UnaryCallSettings.Builder + updateFirewallPolicySettings; + private final UnaryCallSettings.Builder + deleteFirewallPolicySettings; private final PagedCallSettings.Builder< ListRelatedAccountGroupsRequest, ListRelatedAccountGroupsResponse, @@ -700,6 +832,12 @@ protected Builder(ClientContext clientContext) { deleteKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); migrateKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getMetricsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFirewallPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listFirewallPoliciesSettings = + PagedCallSettings.newBuilder(LIST_FIREWALL_POLICIES_PAGE_STR_FACT); + getFirewallPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFirewallPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFirewallPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listRelatedAccountGroupsSettings = PagedCallSettings.newBuilder(LIST_RELATED_ACCOUNT_GROUPS_PAGE_STR_FACT); listRelatedAccountGroupMembershipsSettings = @@ -719,6 +857,11 @@ protected Builder(ClientContext clientContext) { deleteKeySettings, migrateKeySettings, getMetricsSettings, + createFirewallPolicySettings, + listFirewallPoliciesSettings, + getFirewallPolicySettings, + updateFirewallPolicySettings, + deleteFirewallPolicySettings, listRelatedAccountGroupsSettings, listRelatedAccountGroupMembershipsSettings, searchRelatedAccountGroupMembershipsSettings); @@ -738,6 +881,11 @@ protected Builder(RecaptchaEnterpriseServiceStubSettings settings) { deleteKeySettings = settings.deleteKeySettings.toBuilder(); migrateKeySettings = settings.migrateKeySettings.toBuilder(); getMetricsSettings = settings.getMetricsSettings.toBuilder(); + createFirewallPolicySettings = settings.createFirewallPolicySettings.toBuilder(); + listFirewallPoliciesSettings = settings.listFirewallPoliciesSettings.toBuilder(); + getFirewallPolicySettings = settings.getFirewallPolicySettings.toBuilder(); + updateFirewallPolicySettings = settings.updateFirewallPolicySettings.toBuilder(); + deleteFirewallPolicySettings = settings.deleteFirewallPolicySettings.toBuilder(); listRelatedAccountGroupsSettings = settings.listRelatedAccountGroupsSettings.toBuilder(); listRelatedAccountGroupMembershipsSettings = settings.listRelatedAccountGroupMembershipsSettings.toBuilder(); @@ -756,6 +904,11 @@ protected Builder(RecaptchaEnterpriseServiceStubSettings settings) { deleteKeySettings, migrateKeySettings, getMetricsSettings, + createFirewallPolicySettings, + listFirewallPoliciesSettings, + getFirewallPolicySettings, + updateFirewallPolicySettings, + deleteFirewallPolicySettings, listRelatedAccountGroupsSettings, listRelatedAccountGroupMembershipsSettings, searchRelatedAccountGroupMembershipsSettings); @@ -825,6 +978,31 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .createFirewallPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listFirewallPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getFirewallPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateFirewallPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteFirewallPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listRelatedAccountGroupsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -913,6 +1091,39 @@ public UnaryCallSettings.Builder getMetricsSettings( return getMetricsSettings; } + /** Returns the builder for the settings used for calls to createFirewallPolicy. */ + public UnaryCallSettings.Builder + createFirewallPolicySettings() { + return createFirewallPolicySettings; + } + + /** Returns the builder for the settings used for calls to listFirewallPolicies. */ + public PagedCallSettings.Builder< + ListFirewallPoliciesRequest, + ListFirewallPoliciesResponse, + ListFirewallPoliciesPagedResponse> + listFirewallPoliciesSettings() { + return listFirewallPoliciesSettings; + } + + /** Returns the builder for the settings used for calls to getFirewallPolicy. */ + public UnaryCallSettings.Builder + getFirewallPolicySettings() { + return getFirewallPolicySettings; + } + + /** Returns the builder for the settings used for calls to updateFirewallPolicy. */ + public UnaryCallSettings.Builder + updateFirewallPolicySettings() { + return updateFirewallPolicySettings; + } + + /** Returns the builder for the settings used for calls to deleteFirewallPolicy. */ + public UnaryCallSettings.Builder + deleteFirewallPolicySettings() { + return deleteFirewallPolicySettings; + } + /** Returns the builder for the settings used for calls to listRelatedAccountGroups. */ public PagedCallSettings.Builder< ListRelatedAccountGroupsRequest, diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java index b96ae8c81774..632a1f38eb99 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java @@ -205,7 +205,7 @@ public RecaptchaEnterpriseServiceV1Beta1Stub getStub() { * } * * @param parent Required. The name of the project in which the assessment will be created, in the - * format "projects/{project_number}". + * format `projects/{project_number}`. * @param assessment Required. The assessment details. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -240,7 +240,7 @@ public final Assessment createAssessment(ProjectName parent, Assessment assessme * } * * @param parent Required. The name of the project in which the assessment will be created, in the - * format "projects/{project_number}". + * format `projects/{project_number}`. * @param assessment Required. The assessment details. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -334,7 +334,7 @@ public final UnaryCallable createAssessment * } * * @param name Required. The resource name of the Assessment, in the format - * "projects/{project_number}/assessments/{assessment_id}". + * `projects/{project_number}/assessments/{assessment_id}`. * @param 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. @@ -374,7 +374,7 @@ public final AnnotateAssessmentResponse annotateAssessment( * } * * @param name Required. The resource name of the Assessment, in the format - * "projects/{project_number}/assessments/{assessment_id}". + * `projects/{project_number}/assessments/{assessment_id}`. * @param 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. diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/resources/META-INF/native-image/com.google.cloud.recaptchaenterprise.v1/reflect-config.json b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/resources/META-INF/native-image/com.google.cloud.recaptchaenterprise.v1/reflect-config.json index 5730d3f18fe8..bdeb97cdcd48 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/resources/META-INF/native-image/com.google.cloud.recaptchaenterprise.v1/reflect-config.json +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/resources/META-INF/native-image/com.google.cloud.recaptchaenterprise.v1/reflect-config.json @@ -377,6 +377,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", "queryAllDeclaredConstructors": true, @@ -1169,6 +1187,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.recaptchaenterprise.v1.AppleDeveloperId", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.AppleDeveloperId$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.recaptchaenterprise.v1.Assessment", "queryAllDeclaredConstructors": true, @@ -1223,6 +1259,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.recaptchaenterprise.v1.CreateKeyRequest", "queryAllDeclaredConstructors": true, @@ -1241,6 +1295,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.recaptchaenterprise.v1.DeleteKeyRequest", "queryAllDeclaredConstructors": true, @@ -1295,6 +1367,150 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$AllowAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$AllowAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$BlockAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$BlockAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$RedirectAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$RedirectAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$SetHeaderAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$SetHeaderAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$SubstituteAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallAction$SubstituteAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallPolicyAssessment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FirewallPolicyAssessment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.recaptchaenterprise.v1.FraudPreventionAssessment", "queryAllDeclaredConstructors": true, @@ -1304,6 +1520,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.recaptchaenterprise.v1.FraudPreventionAssessment$BehavioralTrustVerdict", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FraudPreventionAssessment$BehavioralTrustVerdict$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.recaptchaenterprise.v1.FraudPreventionAssessment$Builder", "queryAllDeclaredConstructors": true, @@ -1349,6 +1583,87 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.recaptchaenterprise.v1.FraudSignals", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FraudSignals$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FraudSignals$CardSignals", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FraudSignals$CardSignals$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FraudSignals$CardSignals$CardLabel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FraudSignals$UserSignals", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.FraudSignals$UserSignals$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.recaptchaenterprise.v1.GetKeyRequest", "queryAllDeclaredConstructors": true, @@ -1421,6 +1736,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.recaptchaenterprise.v1.ListKeysRequest", "queryAllDeclaredConstructors": true, @@ -1925,6 +2276,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.recaptchaenterprise.v1.UpdateKeyRequest", "queryAllDeclaredConstructors": true, @@ -2014,5 +2383,23 @@ "allPublicMethods": true, "allDeclaredClasses": true, "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true } ] \ No newline at end of file diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/resources/META-INF/native-image/com.google.cloud.recaptchaenterprise.v1beta1/reflect-config.json b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/resources/META-INF/native-image/com.google.cloud.recaptchaenterprise.v1beta1/reflect-config.json index 76c489421c59..8268e39dfc6d 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/resources/META-INF/native-image/com.google.cloud.recaptchaenterprise.v1beta1/reflect-config.json +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/main/resources/META-INF/native-image/com.google.cloud.recaptchaenterprise.v1beta1/reflect-config.json @@ -1160,6 +1160,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment$BehavioralTrustVerdict", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment$BehavioralTrustVerdict$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment$Builder", "queryAllDeclaredConstructors": true, diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/test/java/com/google/cloud/recaptchaenterprise/v1/MockRecaptchaEnterpriseServiceImpl.java b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/test/java/com/google/cloud/recaptchaenterprise/v1/MockRecaptchaEnterpriseServiceImpl.java index cf5bc7189863..1dabc72e4372 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/test/java/com/google/cloud/recaptchaenterprise/v1/MockRecaptchaEnterpriseServiceImpl.java +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/test/java/com/google/cloud/recaptchaenterprise/v1/MockRecaptchaEnterpriseServiceImpl.java @@ -23,11 +23,17 @@ import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse; import com.google.recaptchaenterprise.v1.Assessment; import com.google.recaptchaenterprise.v1.CreateAssessmentRequest; +import com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.CreateKeyRequest; +import com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.DeleteKeyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.GetKeyRequest; import com.google.recaptchaenterprise.v1.GetMetricsRequest; import com.google.recaptchaenterprise.v1.Key; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse; import com.google.recaptchaenterprise.v1.ListKeysRequest; import com.google.recaptchaenterprise.v1.ListKeysResponse; import com.google.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest; @@ -41,6 +47,7 @@ import com.google.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest; import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse; +import com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.UpdateKeyRequest; import io.grpc.stub.StreamObserver; import java.util.ArrayList; @@ -286,6 +293,112 @@ public void getMetrics(GetMetricsRequest request, StreamObserver respon } } + @Override + public void createFirewallPolicy( + CreateFirewallPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FirewallPolicy) { + requests.add(request); + responseObserver.onNext(((FirewallPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateFirewallPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FirewallPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFirewallPolicies( + ListFirewallPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListFirewallPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((ListFirewallPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListFirewallPolicies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFirewallPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getFirewallPolicy( + GetFirewallPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FirewallPolicy) { + requests.add(request); + responseObserver.onNext(((FirewallPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetFirewallPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FirewallPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateFirewallPolicy( + UpdateFirewallPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FirewallPolicy) { + requests.add(request); + responseObserver.onNext(((FirewallPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateFirewallPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FirewallPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteFirewallPolicy( + DeleteFirewallPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteFirewallPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + @Override public void listRelatedAccountGroups( ListRelatedAccountGroupsRequest request, diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/test/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClientTest.java b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/test/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClientTest.java index 7c5de2cd7c56..0c2c98857659 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/test/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClientTest.java +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/src/test/java/com/google/cloud/recaptchaenterprise/v1/RecaptchaEnterpriseServiceClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.recaptchaenterprise.v1; +import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListFirewallPoliciesPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListKeysPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupMembershipsPagedResponse; import static com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient.ListRelatedAccountGroupsPagedResponse; @@ -42,14 +43,24 @@ import com.google.recaptchaenterprise.v1.AssessmentName; import com.google.recaptchaenterprise.v1.ChallengeMetrics; import com.google.recaptchaenterprise.v1.CreateAssessmentRequest; +import com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.CreateKeyRequest; +import com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.DeleteKeyRequest; import com.google.recaptchaenterprise.v1.Event; +import com.google.recaptchaenterprise.v1.FirewallAction; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.FirewallPolicyAssessment; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; import com.google.recaptchaenterprise.v1.FraudPreventionAssessment; +import com.google.recaptchaenterprise.v1.FraudSignals; +import com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.GetKeyRequest; import com.google.recaptchaenterprise.v1.GetMetricsRequest; import com.google.recaptchaenterprise.v1.Key; import com.google.recaptchaenterprise.v1.KeyName; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse; import com.google.recaptchaenterprise.v1.ListKeysRequest; import com.google.recaptchaenterprise.v1.ListKeysResponse; import com.google.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest; @@ -72,6 +83,7 @@ import com.google.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse; import com.google.recaptchaenterprise.v1.TestingOptions; import com.google.recaptchaenterprise.v1.TokenProperties; +import com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest; import com.google.recaptchaenterprise.v1.UpdateKeyRequest; import com.google.recaptchaenterprise.v1.WafSettings; import io.grpc.StatusRuntimeException; @@ -140,7 +152,9 @@ public void createAssessmentTest() throws Exception { .setAccountDefenderAssessment(AccountDefenderAssessment.newBuilder().build()) .setPrivatePasswordLeakVerification( PrivatePasswordLeakVerification.newBuilder().build()) + .setFirewallPolicyAssessment(FirewallPolicyAssessment.newBuilder().build()) .setFraudPreventionAssessment(FraudPreventionAssessment.newBuilder().build()) + .setFraudSignals(FraudSignals.newBuilder().build()) .build(); mockRecaptchaEnterpriseService.addResponse(expectedResponse); @@ -189,7 +203,9 @@ public void createAssessmentTest2() throws Exception { .setAccountDefenderAssessment(AccountDefenderAssessment.newBuilder().build()) .setPrivatePasswordLeakVerification( PrivatePasswordLeakVerification.newBuilder().build()) + .setFirewallPolicyAssessment(FirewallPolicyAssessment.newBuilder().build()) .setFraudPreventionAssessment(FraudPreventionAssessment.newBuilder().build()) + .setFraudSignals(FraudSignals.newBuilder().build()) .build(); mockRecaptchaEnterpriseService.addResponse(expectedResponse); @@ -898,6 +914,388 @@ public void getMetricsExceptionTest2() throws Exception { } } + @Test + public void createFirewallPolicyTest() throws Exception { + FirewallPolicy expectedResponse = + FirewallPolicy.newBuilder() + .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString()) + .setDescription("description-1724546052") + .setPath("path3433509") + .setCondition("condition-861311717") + .addAllActions(new ArrayList()) + .build(); + mockRecaptchaEnterpriseService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build(); + + FirewallPolicy actualResponse = client.createFirewallPolicy(parent, firewallPolicy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRecaptchaEnterpriseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFirewallPolicyRequest actualRequest = + ((CreateFirewallPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(firewallPolicy, actualRequest.getFirewallPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFirewallPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecaptchaEnterpriseService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build(); + client.createFirewallPolicy(parent, firewallPolicy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFirewallPolicyTest2() throws Exception { + FirewallPolicy expectedResponse = + FirewallPolicy.newBuilder() + .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString()) + .setDescription("description-1724546052") + .setPath("path3433509") + .setCondition("condition-861311717") + .addAllActions(new ArrayList()) + .build(); + mockRecaptchaEnterpriseService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build(); + + FirewallPolicy actualResponse = client.createFirewallPolicy(parent, firewallPolicy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRecaptchaEnterpriseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFirewallPolicyRequest actualRequest = + ((CreateFirewallPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(firewallPolicy, actualRequest.getFirewallPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFirewallPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecaptchaEnterpriseService.addException(exception); + + try { + String parent = "parent-995424086"; + FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build(); + client.createFirewallPolicy(parent, firewallPolicy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFirewallPoliciesTest() throws Exception { + FirewallPolicy responsesElement = FirewallPolicy.newBuilder().build(); + ListFirewallPoliciesResponse expectedResponse = + ListFirewallPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllFirewallPolicies(Arrays.asList(responsesElement)) + .build(); + mockRecaptchaEnterpriseService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListFirewallPoliciesPagedResponse pagedListResponse = client.listFirewallPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFirewallPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockRecaptchaEnterpriseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFirewallPoliciesRequest actualRequest = + ((ListFirewallPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFirewallPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecaptchaEnterpriseService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listFirewallPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFirewallPoliciesTest2() throws Exception { + FirewallPolicy responsesElement = FirewallPolicy.newBuilder().build(); + ListFirewallPoliciesResponse expectedResponse = + ListFirewallPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllFirewallPolicies(Arrays.asList(responsesElement)) + .build(); + mockRecaptchaEnterpriseService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFirewallPoliciesPagedResponse pagedListResponse = client.listFirewallPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getFirewallPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockRecaptchaEnterpriseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFirewallPoliciesRequest actualRequest = + ((ListFirewallPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFirewallPoliciesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecaptchaEnterpriseService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFirewallPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFirewallPolicyTest() throws Exception { + FirewallPolicy expectedResponse = + FirewallPolicy.newBuilder() + .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString()) + .setDescription("description-1724546052") + .setPath("path3433509") + .setCondition("condition-861311717") + .addAllActions(new ArrayList()) + .build(); + mockRecaptchaEnterpriseService.addResponse(expectedResponse); + + FirewallPolicyName name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]"); + + FirewallPolicy actualResponse = client.getFirewallPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRecaptchaEnterpriseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFirewallPolicyRequest actualRequest = ((GetFirewallPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFirewallPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecaptchaEnterpriseService.addException(exception); + + try { + FirewallPolicyName name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]"); + client.getFirewallPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFirewallPolicyTest2() throws Exception { + FirewallPolicy expectedResponse = + FirewallPolicy.newBuilder() + .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString()) + .setDescription("description-1724546052") + .setPath("path3433509") + .setCondition("condition-861311717") + .addAllActions(new ArrayList()) + .build(); + mockRecaptchaEnterpriseService.addResponse(expectedResponse); + + String name = "name3373707"; + + FirewallPolicy actualResponse = client.getFirewallPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRecaptchaEnterpriseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFirewallPolicyRequest actualRequest = ((GetFirewallPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFirewallPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecaptchaEnterpriseService.addException(exception); + + try { + String name = "name3373707"; + client.getFirewallPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFirewallPolicyTest() throws Exception { + FirewallPolicy expectedResponse = + FirewallPolicy.newBuilder() + .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString()) + .setDescription("description-1724546052") + .setPath("path3433509") + .setCondition("condition-861311717") + .addAllActions(new ArrayList()) + .build(); + mockRecaptchaEnterpriseService.addResponse(expectedResponse); + + FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + FirewallPolicy actualResponse = client.updateFirewallPolicy(firewallPolicy, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRecaptchaEnterpriseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFirewallPolicyRequest actualRequest = + ((UpdateFirewallPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(firewallPolicy, actualRequest.getFirewallPolicy()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFirewallPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecaptchaEnterpriseService.addException(exception); + + try { + FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFirewallPolicy(firewallPolicy, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFirewallPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRecaptchaEnterpriseService.addResponse(expectedResponse); + + FirewallPolicyName name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]"); + + client.deleteFirewallPolicy(name); + + List actualRequests = mockRecaptchaEnterpriseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFirewallPolicyRequest actualRequest = + ((DeleteFirewallPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFirewallPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecaptchaEnterpriseService.addException(exception); + + try { + FirewallPolicyName name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]"); + client.deleteFirewallPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFirewallPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockRecaptchaEnterpriseService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteFirewallPolicy(name); + + List actualRequests = mockRecaptchaEnterpriseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFirewallPolicyRequest actualRequest = + ((DeleteFirewallPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFirewallPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecaptchaEnterpriseService.addException(exception); + + try { + String name = "name3373707"; + client.deleteFirewallPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listRelatedAccountGroupsTest() throws Exception { RelatedAccountGroup responsesElement = RelatedAccountGroup.newBuilder().build(); diff --git a/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RecaptchaEnterpriseServiceGrpc.java b/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RecaptchaEnterpriseServiceGrpc.java index 6defcdd45e9c..beb9bf10a6e6 100644 --- a/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RecaptchaEnterpriseServiceGrpc.java +++ b/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RecaptchaEnterpriseServiceGrpc.java @@ -501,6 +501,265 @@ private RecaptchaEnterpriseServiceGrpc() {} return getGetMetricsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy> + getCreateFirewallPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFirewallPolicy", + requestType = com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest.class, + responseType = com.google.recaptchaenterprise.v1.FirewallPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy> + getCreateFirewallPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy> + getCreateFirewallPolicyMethod; + if ((getCreateFirewallPolicyMethod = + RecaptchaEnterpriseServiceGrpc.getCreateFirewallPolicyMethod) + == null) { + synchronized (RecaptchaEnterpriseServiceGrpc.class) { + if ((getCreateFirewallPolicyMethod = + RecaptchaEnterpriseServiceGrpc.getCreateFirewallPolicyMethod) + == null) { + RecaptchaEnterpriseServiceGrpc.getCreateFirewallPolicyMethod = + getCreateFirewallPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateFirewallPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.recaptchaenterprise.v1.FirewallPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new RecaptchaEnterpriseServiceMethodDescriptorSupplier( + "CreateFirewallPolicy")) + .build(); + } + } + } + return getCreateFirewallPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest, + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse> + getListFirewallPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFirewallPolicies", + requestType = com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest.class, + responseType = com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest, + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse> + getListFirewallPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest, + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse> + getListFirewallPoliciesMethod; + if ((getListFirewallPoliciesMethod = + RecaptchaEnterpriseServiceGrpc.getListFirewallPoliciesMethod) + == null) { + synchronized (RecaptchaEnterpriseServiceGrpc.class) { + if ((getListFirewallPoliciesMethod = + RecaptchaEnterpriseServiceGrpc.getListFirewallPoliciesMethod) + == null) { + RecaptchaEnterpriseServiceGrpc.getListFirewallPoliciesMethod = + getListFirewallPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListFirewallPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new RecaptchaEnterpriseServiceMethodDescriptorSupplier( + "ListFirewallPolicies")) + .build(); + } + } + } + return getListFirewallPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy> + getGetFirewallPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFirewallPolicy", + requestType = com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest.class, + responseType = com.google.recaptchaenterprise.v1.FirewallPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy> + getGetFirewallPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy> + getGetFirewallPolicyMethod; + if ((getGetFirewallPolicyMethod = RecaptchaEnterpriseServiceGrpc.getGetFirewallPolicyMethod) + == null) { + synchronized (RecaptchaEnterpriseServiceGrpc.class) { + if ((getGetFirewallPolicyMethod = RecaptchaEnterpriseServiceGrpc.getGetFirewallPolicyMethod) + == null) { + RecaptchaEnterpriseServiceGrpc.getGetFirewallPolicyMethod = + getGetFirewallPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFirewallPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.recaptchaenterprise.v1.FirewallPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new RecaptchaEnterpriseServiceMethodDescriptorSupplier( + "GetFirewallPolicy")) + .build(); + } + } + } + return getGetFirewallPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy> + getUpdateFirewallPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFirewallPolicy", + requestType = com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest.class, + responseType = com.google.recaptchaenterprise.v1.FirewallPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy> + getUpdateFirewallPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy> + getUpdateFirewallPolicyMethod; + if ((getUpdateFirewallPolicyMethod = + RecaptchaEnterpriseServiceGrpc.getUpdateFirewallPolicyMethod) + == null) { + synchronized (RecaptchaEnterpriseServiceGrpc.class) { + if ((getUpdateFirewallPolicyMethod = + RecaptchaEnterpriseServiceGrpc.getUpdateFirewallPolicyMethod) + == null) { + RecaptchaEnterpriseServiceGrpc.getUpdateFirewallPolicyMethod = + getUpdateFirewallPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateFirewallPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.recaptchaenterprise.v1.FirewallPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new RecaptchaEnterpriseServiceMethodDescriptorSupplier( + "UpdateFirewallPolicy")) + .build(); + } + } + } + return getUpdateFirewallPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest, com.google.protobuf.Empty> + getDeleteFirewallPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFirewallPolicy", + requestType = com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest, com.google.protobuf.Empty> + getDeleteFirewallPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest, + com.google.protobuf.Empty> + getDeleteFirewallPolicyMethod; + if ((getDeleteFirewallPolicyMethod = + RecaptchaEnterpriseServiceGrpc.getDeleteFirewallPolicyMethod) + == null) { + synchronized (RecaptchaEnterpriseServiceGrpc.class) { + if ((getDeleteFirewallPolicyMethod = + RecaptchaEnterpriseServiceGrpc.getDeleteFirewallPolicyMethod) + == null) { + RecaptchaEnterpriseServiceGrpc.getDeleteFirewallPolicyMethod = + getDeleteFirewallPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteFirewallPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new RecaptchaEnterpriseServiceMethodDescriptorSupplier( + "DeleteFirewallPolicy")) + .build(); + } + } + } + return getDeleteFirewallPolicyMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest, com.google.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse> @@ -843,7 +1102,7 @@ default void deleteKey( * 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 Site Key, and + * 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. * @@ -868,6 +1127,82 @@ default void getMetrics( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMetricsMethod(), responseObserver); } + /** + * + * + *
+     * Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA
+     * Enterprise actions can be executed.
+     * A project may have a maximum of 1000 policies.
+     * 
+ */ + default void createFirewallPolicy( + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateFirewallPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the list of all firewall policies that belong to a project.
+     * 
+ */ + default void listFirewallPolicies( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListFirewallPoliciesMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the specified firewall policy.
+     * 
+ */ + default void getFirewallPolicy( + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetFirewallPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified firewall policy.
+     * 
+ */ + default void updateFirewallPolicy( + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateFirewallPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified firewall policy.
+     * 
+ */ + default void deleteFirewallPolicy( + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteFirewallPolicyMethod(), responseObserver); + } + /** * * @@ -1086,7 +1421,7 @@ public void deleteKey( * 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 Site Key, and + * 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. * @@ -1113,6 +1448,92 @@ public void getMetrics( getChannel().newCall(getGetMetricsMethod(), getCallOptions()), request, responseObserver); } + /** + * + * + *
+     * Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA
+     * Enterprise actions can be executed.
+     * A project may have a maximum of 1000 policies.
+     * 
+ */ + public void createFirewallPolicy( + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFirewallPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the list of all firewall policies that belong to a project.
+     * 
+ */ + public void listFirewallPolicies( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFirewallPoliciesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the specified firewall policy.
+     * 
+ */ + public void getFirewallPolicy( + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFirewallPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified firewall policy.
+     * 
+ */ + public void updateFirewallPolicy( + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFirewallPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified firewall policy.
+     * 
+ */ + public void deleteFirewallPolicy( + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFirewallPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1303,7 +1724,7 @@ public com.google.protobuf.Empty deleteKey( * 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 Site Key, and + * 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. * @@ -1328,6 +1749,73 @@ public com.google.recaptchaenterprise.v1.Metrics getMetrics( getChannel(), getGetMetricsMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA
+     * Enterprise actions can be executed.
+     * A project may have a maximum of 1000 policies.
+     * 
+ */ + public com.google.recaptchaenterprise.v1.FirewallPolicy createFirewallPolicy( + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFirewallPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the list of all firewall policies that belong to a project.
+     * 
+ */ + public com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse listFirewallPolicies( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFirewallPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the specified firewall policy.
+     * 
+ */ + public com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy( + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFirewallPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified firewall policy.
+     * 
+ */ + public com.google.recaptchaenterprise.v1.FirewallPolicy updateFirewallPolicy( + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFirewallPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified firewall policy.
+     * 
+ */ + public com.google.protobuf.Empty deleteFirewallPolicy( + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFirewallPolicyMethod(), getCallOptions(), request); + } + /** * * @@ -1511,7 +1999,7 @@ public com.google.common.util.concurrent.ListenableFuture @@ -1537,6 +2025,81 @@ public com.google.common.util.concurrent.ListenableFuture + * Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA + * Enterprise actions can be executed. + * A project may have a maximum of 1000 policies. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1.FirewallPolicy> + createFirewallPolicy( + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateFirewallPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the list of all firewall policies that belong to a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse> + listFirewallPolicies( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFirewallPoliciesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the specified firewall policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1.FirewallPolicy> + getFirewallPolicy(com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFirewallPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified firewall policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1.FirewallPolicy> + updateFirewallPolicy( + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFirewallPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified firewall policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteFirewallPolicy( + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFirewallPolicyMethod(), getCallOptions()), request); + } + /** * * @@ -1595,9 +2158,14 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1677,6 +2245,36 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_FIREWALL_POLICY: + serviceImpl.createFirewallPolicy( + (com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_FIREWALL_POLICIES: + serviceImpl.listFirewallPolicies( + (com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse>) + responseObserver); + break; + case METHODID_GET_FIREWALL_POLICY: + serviceImpl.getFirewallPolicy( + (com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_FIREWALL_POLICY: + serviceImpl.updateFirewallPolicy( + (com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_FIREWALL_POLICY: + serviceImpl.deleteFirewallPolicy( + (com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_LIST_RELATED_ACCOUNT_GROUPS: serviceImpl.listRelatedAccountGroups( (com.google.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest) request, @@ -1782,6 +2380,40 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.recaptchaenterprise.v1.GetMetricsRequest, com.google.recaptchaenterprise.v1.Metrics>(service, METHODID_GET_METRICS))) + .addMethod( + getCreateFirewallPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy>( + service, METHODID_CREATE_FIREWALL_POLICY))) + .addMethod( + getListFirewallPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest, + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse>( + service, METHODID_LIST_FIREWALL_POLICIES))) + .addMethod( + getGetFirewallPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy>( + service, METHODID_GET_FIREWALL_POLICY))) + .addMethod( + getUpdateFirewallPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest, + com.google.recaptchaenterprise.v1.FirewallPolicy>( + service, METHODID_UPDATE_FIREWALL_POLICY))) + .addMethod( + getDeleteFirewallPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_FIREWALL_POLICY))) .addMethod( getListRelatedAccountGroupsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1864,6 +2496,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteKeyMethod()) .addMethod(getMigrateKeyMethod()) .addMethod(getGetMetricsMethod()) + .addMethod(getCreateFirewallPolicyMethod()) + .addMethod(getListFirewallPoliciesMethod()) + .addMethod(getGetFirewallPolicyMethod()) + .addMethod(getUpdateFirewallPolicyMethod()) + .addMethod(getDeleteFirewallPolicyMethod()) .addMethod(getListRelatedAccountGroupsMethod()) .addMethod(getListRelatedAccountGroupMembershipsMethod()) .addMethod(getSearchRelatedAccountGroupMembershipsMethod()) diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AccountVerificationInfo.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AccountVerificationInfo.java index 936abc824b7d..9f1b29f6c743 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AccountVerificationInfo.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AccountVerificationInfo.java @@ -587,7 +587,7 @@ public int getLatestVerificationResultValue() { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.username is deprecated. - * See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=503 + * See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=552 * @return The username. */ @java.lang.Override @@ -614,7 +614,7 @@ public java.lang.String getUsername() { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.username is deprecated. - * See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=503 + * See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=552 * @return The bytes for username. */ @java.lang.Override @@ -1709,7 +1709,7 @@ public Builder clearLatestVerificationResult() { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.username is - * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=503 + * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=552 * @return The username. */ @java.lang.Deprecated @@ -1735,7 +1735,7 @@ public java.lang.String getUsername() { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.username is - * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=503 + * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=552 * @return The bytes for username. */ @java.lang.Deprecated @@ -1761,7 +1761,7 @@ public com.google.protobuf.ByteString getUsernameBytes() { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.username is - * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=503 + * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=552 * @param value The username to set. * @return This builder for chaining. */ @@ -1786,7 +1786,7 @@ public Builder setUsername(java.lang.String value) { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.username is - * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=503 + * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=552 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1807,7 +1807,7 @@ public Builder clearUsername() { * string username = 2 [deprecated = true]; * * @deprecated google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.username is - * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=503 + * deprecated. See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=552 * @param value The bytes for username to set. * @return This builder for chaining. */ diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AccountVerificationInfoOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AccountVerificationInfoOrBuilder.java index c6fce98fd030..d4c1092dfdd4 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AccountVerificationInfoOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AccountVerificationInfoOrBuilder.java @@ -148,7 +148,7 @@ com.google.recaptchaenterprise.v1.EndpointVerificationInfoOrBuilder getEndpoints * string username = 2 [deprecated = true]; * * @deprecated google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.username is deprecated. - * See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=503 + * See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=552 * @return The username. */ @java.lang.Deprecated @@ -164,7 +164,7 @@ com.google.recaptchaenterprise.v1.EndpointVerificationInfoOrBuilder getEndpoints * string username = 2 [deprecated = true]; * * @deprecated google.cloud.recaptchaenterprise.v1.AccountVerificationInfo.username is deprecated. - * See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=503 + * See google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto;l=552 * @return The bytes for username. */ @java.lang.Deprecated diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AndroidKeySettings.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AndroidKeySettings.java index 4f57bd64879a..11714fecc57c 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AndroidKeySettings.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AndroidKeySettings.java @@ -148,6 +148,25 @@ public com.google.protobuf.ByteString getAllowedPackageNamesBytes(int index) { return allowedPackageNames_.getByteString(index); } + public static final int SUPPORT_NON_GOOGLE_APP_STORE_DISTRIBUTION_FIELD_NUMBER = 3; + private boolean supportNonGoogleAppStoreDistribution_ = false; + /** + * + * + *
+   * 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.
+   * 
+ * + * bool support_non_google_app_store_distribution = 3; + * + * @return The supportNonGoogleAppStoreDistribution. + */ + @java.lang.Override + public boolean getSupportNonGoogleAppStoreDistribution() { + return supportNonGoogleAppStoreDistribution_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -168,6 +187,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowAllPackageNames_ != false) { output.writeBool(2, allowAllPackageNames_); } + if (supportNonGoogleAppStoreDistribution_ != false) { + output.writeBool(3, supportNonGoogleAppStoreDistribution_); + } getUnknownFields().writeTo(output); } @@ -188,6 +210,11 @@ public int getSerializedSize() { if (allowAllPackageNames_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowAllPackageNames_); } + if (supportNonGoogleAppStoreDistribution_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, supportNonGoogleAppStoreDistribution_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -206,6 +233,8 @@ public boolean equals(final java.lang.Object obj) { if (getAllowAllPackageNames() != other.getAllowAllPackageNames()) return false; if (!getAllowedPackageNamesList().equals(other.getAllowedPackageNamesList())) return false; + if (getSupportNonGoogleAppStoreDistribution() + != other.getSupportNonGoogleAppStoreDistribution()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,6 +252,10 @@ public int hashCode() { hash = (37 * hash) + ALLOWED_PACKAGE_NAMES_FIELD_NUMBER; hash = (53 * hash) + getAllowedPackageNamesList().hashCode(); } + hash = (37 * hash) + SUPPORT_NON_GOOGLE_APP_STORE_DISTRIBUTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getSupportNonGoogleAppStoreDistribution()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -364,6 +397,7 @@ public Builder clear() { bitField0_ = 0; allowAllPackageNames_ = false; allowedPackageNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + supportNonGoogleAppStoreDistribution_ = false; return this; } @@ -407,6 +441,9 @@ private void buildPartial0(com.google.recaptchaenterprise.v1.AndroidKeySettings allowedPackageNames_.makeImmutable(); result.allowedPackageNames_ = allowedPackageNames_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.supportNonGoogleAppStoreDistribution_ = supportNonGoogleAppStoreDistribution_; + } } @java.lang.Override @@ -468,6 +505,9 @@ public Builder mergeFrom(com.google.recaptchaenterprise.v1.AndroidKeySettings ot } onChanged(); } + if (other.getSupportNonGoogleAppStoreDistribution() != false) { + setSupportNonGoogleAppStoreDistribution(other.getSupportNonGoogleAppStoreDistribution()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -507,6 +547,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 16 + case 24: + { + supportNonGoogleAppStoreDistribution_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -762,6 +808,62 @@ public Builder addAllowedPackageNamesBytes(com.google.protobuf.ByteString value) return this; } + private boolean supportNonGoogleAppStoreDistribution_; + /** + * + * + *
+     * 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.
+     * 
+ * + * bool support_non_google_app_store_distribution = 3; + * + * @return The supportNonGoogleAppStoreDistribution. + */ + @java.lang.Override + public boolean getSupportNonGoogleAppStoreDistribution() { + return supportNonGoogleAppStoreDistribution_; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * bool support_non_google_app_store_distribution = 3; + * + * @param value The supportNonGoogleAppStoreDistribution to set. + * @return This builder for chaining. + */ + public Builder setSupportNonGoogleAppStoreDistribution(boolean value) { + + supportNonGoogleAppStoreDistribution_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * bool support_non_google_app_store_distribution = 3; + * + * @return This builder for chaining. + */ + public Builder clearSupportNonGoogleAppStoreDistribution() { + bitField0_ = (bitField0_ & ~0x00000004); + supportNonGoogleAppStoreDistribution_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AndroidKeySettingsOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AndroidKeySettingsOrBuilder.java index 447c541a7955..54d3d1b1bdb6 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AndroidKeySettingsOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AndroidKeySettingsOrBuilder.java @@ -90,4 +90,18 @@ public interface AndroidKeySettingsOrBuilder * @return The bytes of the allowedPackageNames at the given index. */ com.google.protobuf.ByteString getAllowedPackageNamesBytes(int index); + + /** + * + * + *
+   * 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.
+   * 
+ * + * bool support_non_google_app_store_distribution = 3; + * + * @return The supportNonGoogleAppStoreDistribution. + */ + boolean getSupportNonGoogleAppStoreDistribution(); } diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AnnotateAssessmentRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AnnotateAssessmentRequest.java index af9490ffa8ef..0c7f80861396 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AnnotateAssessmentRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AnnotateAssessmentRequest.java @@ -744,7 +744,7 @@ private Reason(int value) { * *
    * Required. The resource name of the Assessment, in the format
-   * "projects/{project}/assessments/{assessment}".
+   * `projects/{project}/assessments/{assessment}`.
    * 
* * @@ -770,7 +770,7 @@ public java.lang.String getName() { * *
    * Required. The resource name of the Assessment, in the format
-   * "projects/{project}/assessments/{assessment}".
+   * `projects/{project}/assessments/{assessment}`.
    * 
* * @@ -1537,7 +1537,7 @@ public Builder mergeFrom( * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * @@ -1562,7 +1562,7 @@ public java.lang.String getName() { * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * @@ -1587,7 +1587,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * @@ -1611,7 +1611,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * @@ -1631,7 +1631,7 @@ public Builder clearName() { * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AnnotateAssessmentRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AnnotateAssessmentRequestOrBuilder.java index 9e3df3ead224..7f96e9cbfd6b 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AnnotateAssessmentRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AnnotateAssessmentRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface AnnotateAssessmentRequestOrBuilder * *
    * Required. The resource name of the Assessment, in the format
-   * "projects/{project}/assessments/{assessment}".
+   * `projects/{project}/assessments/{assessment}`.
    * 
* * @@ -43,7 +43,7 @@ public interface AnnotateAssessmentRequestOrBuilder * *
    * Required. The resource name of the Assessment, in the format
-   * "projects/{project}/assessments/{assessment}".
+   * `projects/{project}/assessments/{assessment}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AppleDeveloperId.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AppleDeveloperId.java new file mode 100644 index 000000000000..972491a5d260 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AppleDeveloperId.java @@ -0,0 +1,1023 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * Contains fields that are required to perform Apple-specific integrity checks.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.AppleDeveloperId} + */ +public final class AppleDeveloperId extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.AppleDeveloperId) + AppleDeveloperIdOrBuilder { + private static final long serialVersionUID = 0L; + // Use AppleDeveloperId.newBuilder() to construct. + private AppleDeveloperId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AppleDeveloperId() { + privateKey_ = ""; + keyId_ = ""; + teamId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AppleDeveloperId(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.AppleDeveloperId.class, + com.google.recaptchaenterprise.v1.AppleDeveloperId.Builder.class); + } + + public static final int PRIVATE_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object privateKey_ = ""; + /** + * + * + *
+   * 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.
+   * 
+ * + * + * string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The privateKey. + */ + @java.lang.Override + public java.lang.String getPrivateKey() { + java.lang.Object ref = privateKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateKey_ = s; + return s; + } + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The bytes for privateKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrivateKeyBytes() { + java.lang.Object ref = privateKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object keyId_ = ""; + /** + * + * + *
+   * Required. The Apple developer key ID (10-character string).
+   * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + @java.lang.Override + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Apple developer key ID (10-character string).
+   * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEAM_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object teamId_ = ""; + /** + * + * + *
+   * Required. The Apple team ID (10-character string) owning the provisioning
+   * profile used to build your application.
+   * 
+ * + * string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The teamId. + */ + @java.lang.Override + public java.lang.String getTeamId() { + java.lang.Object ref = teamId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + teamId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Apple team ID (10-character string) owning the provisioning
+   * profile used to build your application.
+   * 
+ * + * string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for teamId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTeamIdBytes() { + java.lang.Object ref = teamId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + teamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(privateKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, privateKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(teamId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, teamId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(privateKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, privateKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(teamId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, teamId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.AppleDeveloperId)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.AppleDeveloperId other = + (com.google.recaptchaenterprise.v1.AppleDeveloperId) obj; + + if (!getPrivateKey().equals(other.getPrivateKey())) return false; + if (!getKeyId().equals(other.getKeyId())) return false; + if (!getTeamId().equals(other.getTeamId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRIVATE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPrivateKey().hashCode(); + hash = (37 * hash) + KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getKeyId().hashCode(); + hash = (37 * hash) + TEAM_ID_FIELD_NUMBER; + hash = (53 * hash) + getTeamId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.recaptchaenterprise.v1.AppleDeveloperId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contains fields that are required to perform Apple-specific integrity checks.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.AppleDeveloperId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.AppleDeveloperId) + com.google.recaptchaenterprise.v1.AppleDeveloperIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.AppleDeveloperId.class, + com.google.recaptchaenterprise.v1.AppleDeveloperId.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.AppleDeveloperId.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + privateKey_ = ""; + keyId_ = ""; + teamId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.AppleDeveloperId getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.AppleDeveloperId.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.AppleDeveloperId build() { + com.google.recaptchaenterprise.v1.AppleDeveloperId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.AppleDeveloperId buildPartial() { + com.google.recaptchaenterprise.v1.AppleDeveloperId result = + new com.google.recaptchaenterprise.v1.AppleDeveloperId(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.recaptchaenterprise.v1.AppleDeveloperId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.privateKey_ = privateKey_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.keyId_ = keyId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.teamId_ = teamId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.AppleDeveloperId) { + return mergeFrom((com.google.recaptchaenterprise.v1.AppleDeveloperId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.AppleDeveloperId other) { + if (other == com.google.recaptchaenterprise.v1.AppleDeveloperId.getDefaultInstance()) + return this; + if (!other.getPrivateKey().isEmpty()) { + privateKey_ = other.privateKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKeyId().isEmpty()) { + keyId_ = other.keyId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTeamId().isEmpty()) { + teamId_ = other.teamId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + privateKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + keyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + teamId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object privateKey_ = ""; + /** + * + * + *
+     * 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.
+     * 
+ * + * + * string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The privateKey. + */ + public java.lang.String getPrivateKey() { + java.lang.Object ref = privateKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The bytes for privateKey. + */ + public com.google.protobuf.ByteString getPrivateKeyBytes() { + java.lang.Object ref = privateKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + privateKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The privateKey to set. + * @return This builder for chaining. + */ + public Builder setPrivateKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + privateKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPrivateKey() { + privateKey_ = getDefaultInstance().getPrivateKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The bytes for privateKey to set. + * @return This builder for chaining. + */ + public Builder setPrivateKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + privateKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object keyId_ = ""; + /** + * + * + *
+     * Required. The Apple developer key ID (10-character string).
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Apple developer key ID (10-character string).
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Apple developer key ID (10-character string).
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Apple developer key ID (10-character string).
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKeyId() { + keyId_ = getDefaultInstance().getKeyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Apple developer key ID (10-character string).
+     * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object teamId_ = ""; + /** + * + * + *
+     * Required. The Apple team ID (10-character string) owning the provisioning
+     * profile used to build your application.
+     * 
+ * + * string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The teamId. + */ + public java.lang.String getTeamId() { + java.lang.Object ref = teamId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + teamId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Apple team ID (10-character string) owning the provisioning
+     * profile used to build your application.
+     * 
+ * + * string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for teamId. + */ + public com.google.protobuf.ByteString getTeamIdBytes() { + java.lang.Object ref = teamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + teamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Apple team ID (10-character string) owning the provisioning
+     * profile used to build your application.
+     * 
+ * + * string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The teamId to set. + * @return This builder for chaining. + */ + public Builder setTeamId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + teamId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Apple team ID (10-character string) owning the provisioning
+     * profile used to build your application.
+     * 
+ * + * string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTeamId() { + teamId_ = getDefaultInstance().getTeamId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Apple team ID (10-character string) owning the provisioning
+     * profile used to build your application.
+     * 
+ * + * string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for teamId to set. + * @return This builder for chaining. + */ + public Builder setTeamIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + teamId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.AppleDeveloperId) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.AppleDeveloperId) + private static final com.google.recaptchaenterprise.v1.AppleDeveloperId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.AppleDeveloperId(); + } + + public static com.google.recaptchaenterprise.v1.AppleDeveloperId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppleDeveloperId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.AppleDeveloperId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AppleDeveloperIdOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AppleDeveloperIdOrBuilder.java new file mode 100644 index 000000000000..e1c2b7e9901b --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AppleDeveloperIdOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface AppleDeveloperIdOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.AppleDeveloperId) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.
+   * 
+ * + * + * string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The privateKey. + */ + java.lang.String getPrivateKey(); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * string private_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The bytes for privateKey. + */ + com.google.protobuf.ByteString getPrivateKeyBytes(); + + /** + * + * + *
+   * Required. The Apple developer key ID (10-character string).
+   * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + java.lang.String getKeyId(); + /** + * + * + *
+   * Required. The Apple developer key ID (10-character string).
+   * 
+ * + * string key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + com.google.protobuf.ByteString getKeyIdBytes(); + + /** + * + * + *
+   * Required. The Apple team ID (10-character string) owning the provisioning
+   * profile used to build your application.
+   * 
+ * + * string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The teamId. + */ + java.lang.String getTeamId(); + /** + * + * + *
+   * Required. The Apple team ID (10-character string) owning the provisioning
+   * profile used to build your application.
+   * 
+ * + * string team_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for teamId. + */ + com.google.protobuf.ByteString getTeamIdBytes(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Assessment.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Assessment.java index dc44a43466be..1eb1c0f0c947 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Assessment.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Assessment.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Output only. The resource name for the Assessment in the format
-   * "projects/{project}/assessments/{assessment}".
+   * `projects/{project}/assessments/{assessment}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -95,7 +95,7 @@ public java.lang.String getName() { * *
    * Output only. The resource name for the Assessment in the format
-   * "projects/{project}/assessments/{assessment}".
+   * `projects/{project}/assessments/{assessment}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -453,6 +453,66 @@ public boolean hasPrivatePasswordLeakVerification() { : privatePasswordLeakVerification_; } + public static final int FIREWALL_POLICY_ASSESSMENT_FIELD_NUMBER = 10; + private com.google.recaptchaenterprise.v1.FirewallPolicyAssessment firewallPolicyAssessment_; + /** + * + * + *
+   * Assessment returned when firewall policies belonging to the project are
+   * evaluated using the field firewall_policy_evaluation.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + * + * @return Whether the firewallPolicyAssessment field is set. + */ + @java.lang.Override + public boolean hasFirewallPolicyAssessment() { + return firewallPolicyAssessment_ != null; + } + /** + * + * + *
+   * Assessment returned when firewall policies belonging to the project are
+   * evaluated using the field firewall_policy_evaluation.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + * + * @return The firewallPolicyAssessment. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyAssessment getFirewallPolicyAssessment() { + return firewallPolicyAssessment_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.getDefaultInstance() + : firewallPolicyAssessment_; + } + /** + * + * + *
+   * Assessment returned when firewall policies belonging to the project are
+   * evaluated using the field firewall_policy_evaluation.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyAssessmentOrBuilder + getFirewallPolicyAssessmentOrBuilder() { + return firewallPolicyAssessment_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.getDefaultInstance() + : firewallPolicyAssessment_; + } + public static final int FRAUD_PREVENTION_ASSESSMENT_FIELD_NUMBER = 11; private com.google.recaptchaenterprise.v1.FraudPreventionAssessment fraudPreventionAssessment_; /** @@ -511,6 +571,65 @@ public boolean hasFraudPreventionAssessment() { : fraudPreventionAssessment_; } + public static final int FRAUD_SIGNALS_FIELD_NUMBER = 13; + private com.google.recaptchaenterprise.v1.FraudSignals fraudSignals_; + /** + * + * + *
+   * Output only. Fraud Signals specific to the users involved in a payment
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the fraudSignals field is set. + */ + @java.lang.Override + public boolean hasFraudSignals() { + return fraudSignals_ != null; + } + /** + * + * + *
+   * Output only. Fraud Signals specific to the users involved in a payment
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fraudSignals. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals getFraudSignals() { + return fraudSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.getDefaultInstance() + : fraudSignals_; + } + /** + * + * + *
+   * Output only. Fraud Signals specific to the users involved in a payment
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignalsOrBuilder getFraudSignalsOrBuilder() { + return fraudSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.getDefaultInstance() + : fraudSignals_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -546,9 +665,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (privatePasswordLeakVerification_ != null) { output.writeMessage(8, getPrivatePasswordLeakVerification()); } + if (firewallPolicyAssessment_ != null) { + output.writeMessage(10, getFirewallPolicyAssessment()); + } if (fraudPreventionAssessment_ != null) { output.writeMessage(11, getFraudPreventionAssessment()); } + if (fraudSignals_ != null) { + output.writeMessage(13, getFraudSignals()); + } getUnknownFields().writeTo(output); } @@ -583,11 +708,19 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 8, getPrivatePasswordLeakVerification()); } + if (firewallPolicyAssessment_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getFirewallPolicyAssessment()); + } if (fraudPreventionAssessment_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 11, getFraudPreventionAssessment()); } + if (fraudSignals_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getFraudSignals()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -632,11 +765,19 @@ public boolean equals(final java.lang.Object obj) { if (!getPrivatePasswordLeakVerification().equals(other.getPrivatePasswordLeakVerification())) return false; } + if (hasFirewallPolicyAssessment() != other.hasFirewallPolicyAssessment()) return false; + if (hasFirewallPolicyAssessment()) { + if (!getFirewallPolicyAssessment().equals(other.getFirewallPolicyAssessment())) return false; + } if (hasFraudPreventionAssessment() != other.hasFraudPreventionAssessment()) return false; if (hasFraudPreventionAssessment()) { if (!getFraudPreventionAssessment().equals(other.getFraudPreventionAssessment())) return false; } + if (hasFraudSignals() != other.hasFraudSignals()) return false; + if (hasFraudSignals()) { + if (!getFraudSignals().equals(other.getFraudSignals())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -674,10 +815,18 @@ public int hashCode() { hash = (37 * hash) + PRIVATE_PASSWORD_LEAK_VERIFICATION_FIELD_NUMBER; hash = (53 * hash) + getPrivatePasswordLeakVerification().hashCode(); } + if (hasFirewallPolicyAssessment()) { + hash = (37 * hash) + FIREWALL_POLICY_ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + getFirewallPolicyAssessment().hashCode(); + } if (hasFraudPreventionAssessment()) { hash = (37 * hash) + FRAUD_PREVENTION_ASSESSMENT_FIELD_NUMBER; hash = (53 * hash) + getFraudPreventionAssessment().hashCode(); } + if (hasFraudSignals()) { + hash = (37 * hash) + FRAUD_SIGNALS_FIELD_NUMBER; + hash = (53 * hash) + getFraudSignals().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -848,11 +997,21 @@ public Builder clear() { privatePasswordLeakVerificationBuilder_.dispose(); privatePasswordLeakVerificationBuilder_ = null; } + firewallPolicyAssessment_ = null; + if (firewallPolicyAssessmentBuilder_ != null) { + firewallPolicyAssessmentBuilder_.dispose(); + firewallPolicyAssessmentBuilder_ = null; + } fraudPreventionAssessment_ = null; if (fraudPreventionAssessmentBuilder_ != null) { fraudPreventionAssessmentBuilder_.dispose(); fraudPreventionAssessmentBuilder_ = null; } + fraudSignals_ = null; + if (fraudSignalsBuilder_ != null) { + fraudSignalsBuilder_.dispose(); + fraudSignalsBuilder_ = null; + } return this; } @@ -922,11 +1081,21 @@ private void buildPartial0(com.google.recaptchaenterprise.v1.Assessment result) : privatePasswordLeakVerificationBuilder_.build(); } if (((from_bitField0_ & 0x00000080) != 0)) { + result.firewallPolicyAssessment_ = + firewallPolicyAssessmentBuilder_ == null + ? firewallPolicyAssessment_ + : firewallPolicyAssessmentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { result.fraudPreventionAssessment_ = fraudPreventionAssessmentBuilder_ == null ? fraudPreventionAssessment_ : fraudPreventionAssessmentBuilder_.build(); } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.fraudSignals_ = + fraudSignalsBuilder_ == null ? fraudSignals_ : fraudSignalsBuilder_.build(); + } } @java.lang.Override @@ -997,9 +1166,15 @@ public Builder mergeFrom(com.google.recaptchaenterprise.v1.Assessment other) { if (other.hasPrivatePasswordLeakVerification()) { mergePrivatePasswordLeakVerification(other.getPrivatePasswordLeakVerification()); } + if (other.hasFirewallPolicyAssessment()) { + mergeFirewallPolicyAssessment(other.getFirewallPolicyAssessment()); + } if (other.hasFraudPreventionAssessment()) { mergeFraudPreventionAssessment(other.getFraudPreventionAssessment()); } + if (other.hasFraudSignals()) { + mergeFraudSignals(other.getFraudSignals()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1072,13 +1247,26 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 66 + case 82: + { + input.readMessage( + getFirewallPolicyAssessmentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 case 90: { input.readMessage( getFraudPreventionAssessmentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 90 + case 106: + { + input.readMessage(getFraudSignalsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1104,7 +1292,7 @@ public Builder mergeFrom( * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1127,7 +1315,7 @@ public java.lang.String getName() { * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1150,7 +1338,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1172,7 +1360,7 @@ public Builder setName(java.lang.String value) { * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1190,7 +1378,7 @@ public Builder clearName() { * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project}/assessments/{assessment}".
+     * `projects/{project}/assessments/{assessment}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2443,6 +2631,224 @@ public Builder clearPrivatePasswordLeakVerification() { return privatePasswordLeakVerificationBuilder_; } + private com.google.recaptchaenterprise.v1.FirewallPolicyAssessment firewallPolicyAssessment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment, + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyAssessmentOrBuilder> + firewallPolicyAssessmentBuilder_; + /** + * + * + *
+     * Assessment returned when firewall policies belonging to the project are
+     * evaluated using the field firewall_policy_evaluation.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + * + * @return Whether the firewallPolicyAssessment field is set. + */ + public boolean hasFirewallPolicyAssessment() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Assessment returned when firewall policies belonging to the project are
+     * evaluated using the field firewall_policy_evaluation.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + * + * @return The firewallPolicyAssessment. + */ + public com.google.recaptchaenterprise.v1.FirewallPolicyAssessment + getFirewallPolicyAssessment() { + if (firewallPolicyAssessmentBuilder_ == null) { + return firewallPolicyAssessment_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.getDefaultInstance() + : firewallPolicyAssessment_; + } else { + return firewallPolicyAssessmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Assessment returned when firewall policies belonging to the project are
+     * evaluated using the field firewall_policy_evaluation.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + */ + public Builder setFirewallPolicyAssessment( + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment value) { + if (firewallPolicyAssessmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firewallPolicyAssessment_ = value; + } else { + firewallPolicyAssessmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment returned when firewall policies belonging to the project are
+     * evaluated using the field firewall_policy_evaluation.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + */ + public Builder setFirewallPolicyAssessment( + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.Builder builderForValue) { + if (firewallPolicyAssessmentBuilder_ == null) { + firewallPolicyAssessment_ = builderForValue.build(); + } else { + firewallPolicyAssessmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment returned when firewall policies belonging to the project are
+     * evaluated using the field firewall_policy_evaluation.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + */ + public Builder mergeFirewallPolicyAssessment( + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment value) { + if (firewallPolicyAssessmentBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && firewallPolicyAssessment_ != null + && firewallPolicyAssessment_ + != com.google.recaptchaenterprise.v1.FirewallPolicyAssessment + .getDefaultInstance()) { + getFirewallPolicyAssessmentBuilder().mergeFrom(value); + } else { + firewallPolicyAssessment_ = value; + } + } else { + firewallPolicyAssessmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment returned when firewall policies belonging to the project are
+     * evaluated using the field firewall_policy_evaluation.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + */ + public Builder clearFirewallPolicyAssessment() { + bitField0_ = (bitField0_ & ~0x00000080); + firewallPolicyAssessment_ = null; + if (firewallPolicyAssessmentBuilder_ != null) { + firewallPolicyAssessmentBuilder_.dispose(); + firewallPolicyAssessmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment returned when firewall policies belonging to the project are
+     * evaluated using the field firewall_policy_evaluation.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.Builder + getFirewallPolicyAssessmentBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getFirewallPolicyAssessmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Assessment returned when firewall policies belonging to the project are
+     * evaluated using the field firewall_policy_evaluation.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicyAssessmentOrBuilder + getFirewallPolicyAssessmentOrBuilder() { + if (firewallPolicyAssessmentBuilder_ != null) { + return firewallPolicyAssessmentBuilder_.getMessageOrBuilder(); + } else { + return firewallPolicyAssessment_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.getDefaultInstance() + : firewallPolicyAssessment_; + } + } + /** + * + * + *
+     * Assessment returned when firewall policies belonging to the project are
+     * evaluated using the field firewall_policy_evaluation.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment, + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyAssessmentOrBuilder> + getFirewallPolicyAssessmentFieldBuilder() { + if (firewallPolicyAssessmentBuilder_ == null) { + firewallPolicyAssessmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment, + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyAssessmentOrBuilder>( + getFirewallPolicyAssessment(), getParentForChildren(), isClean()); + firewallPolicyAssessment_ = null; + } + return firewallPolicyAssessmentBuilder_; + } + private com.google.recaptchaenterprise.v1.FraudPreventionAssessment fraudPreventionAssessment_; private com.google.protobuf.SingleFieldBuilderV3< com.google.recaptchaenterprise.v1.FraudPreventionAssessment, @@ -2463,7 +2869,7 @@ public Builder clearPrivatePasswordLeakVerification() { * @return Whether the fraudPreventionAssessment field is set. */ public boolean hasFraudPreventionAssessment() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -2509,7 +2915,7 @@ public Builder setFraudPreventionAssessment( } else { fraudPreventionAssessmentBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2531,7 +2937,7 @@ public Builder setFraudPreventionAssessment( } else { fraudPreventionAssessmentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2549,7 +2955,7 @@ public Builder setFraudPreventionAssessment( public Builder mergeFraudPreventionAssessment( com.google.recaptchaenterprise.v1.FraudPreventionAssessment value) { if (fraudPreventionAssessmentBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000100) != 0) && fraudPreventionAssessment_ != null && fraudPreventionAssessment_ != com.google.recaptchaenterprise.v1.FraudPreventionAssessment @@ -2561,7 +2967,7 @@ public Builder mergeFraudPreventionAssessment( } else { fraudPreventionAssessmentBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2577,7 +2983,7 @@ public Builder mergeFraudPreventionAssessment( *
*/ public Builder clearFraudPreventionAssessment() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); fraudPreventionAssessment_ = null; if (fraudPreventionAssessmentBuilder_ != null) { fraudPreventionAssessmentBuilder_.dispose(); @@ -2599,7 +3005,7 @@ public Builder clearFraudPreventionAssessment() { */ public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.Builder getFraudPreventionAssessmentBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return getFraudPreventionAssessmentFieldBuilder().getBuilder(); } @@ -2652,6 +3058,218 @@ public Builder clearFraudPreventionAssessment() { return fraudPreventionAssessmentBuilder_; } + private com.google.recaptchaenterprise.v1.FraudSignals fraudSignals_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudSignals, + com.google.recaptchaenterprise.v1.FraudSignals.Builder, + com.google.recaptchaenterprise.v1.FraudSignalsOrBuilder> + fraudSignalsBuilder_; + /** + * + * + *
+     * Output only. Fraud Signals specific to the users involved in a payment
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the fraudSignals field is set. + */ + public boolean hasFraudSignals() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Output only. Fraud Signals specific to the users involved in a payment
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fraudSignals. + */ + public com.google.recaptchaenterprise.v1.FraudSignals getFraudSignals() { + if (fraudSignalsBuilder_ == null) { + return fraudSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.getDefaultInstance() + : fraudSignals_; + } else { + return fraudSignalsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Fraud Signals specific to the users involved in a payment
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFraudSignals(com.google.recaptchaenterprise.v1.FraudSignals value) { + if (fraudSignalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fraudSignals_ = value; + } else { + fraudSignalsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Fraud Signals specific to the users involved in a payment
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFraudSignals( + com.google.recaptchaenterprise.v1.FraudSignals.Builder builderForValue) { + if (fraudSignalsBuilder_ == null) { + fraudSignals_ = builderForValue.build(); + } else { + fraudSignalsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Fraud Signals specific to the users involved in a payment
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeFraudSignals(com.google.recaptchaenterprise.v1.FraudSignals value) { + if (fraudSignalsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && fraudSignals_ != null + && fraudSignals_ + != com.google.recaptchaenterprise.v1.FraudSignals.getDefaultInstance()) { + getFraudSignalsBuilder().mergeFrom(value); + } else { + fraudSignals_ = value; + } + } else { + fraudSignalsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Fraud Signals specific to the users involved in a payment
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFraudSignals() { + bitField0_ = (bitField0_ & ~0x00000200); + fraudSignals_ = null; + if (fraudSignalsBuilder_ != null) { + fraudSignalsBuilder_.dispose(); + fraudSignalsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Fraud Signals specific to the users involved in a payment
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.recaptchaenterprise.v1.FraudSignals.Builder getFraudSignalsBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getFraudSignalsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Fraud Signals specific to the users involved in a payment
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.recaptchaenterprise.v1.FraudSignalsOrBuilder getFraudSignalsOrBuilder() { + if (fraudSignalsBuilder_ != null) { + return fraudSignalsBuilder_.getMessageOrBuilder(); + } else { + return fraudSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.getDefaultInstance() + : fraudSignals_; + } + } + /** + * + * + *
+     * Output only. Fraud Signals specific to the users involved in a payment
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudSignals, + com.google.recaptchaenterprise.v1.FraudSignals.Builder, + com.google.recaptchaenterprise.v1.FraudSignalsOrBuilder> + getFraudSignalsFieldBuilder() { + if (fraudSignalsBuilder_ == null) { + fraudSignalsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudSignals, + com.google.recaptchaenterprise.v1.FraudSignals.Builder, + com.google.recaptchaenterprise.v1.FraudSignalsOrBuilder>( + getFraudSignals(), getParentForChildren(), isClean()); + fraudSignals_ = null; + } + return fraudSignalsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AssessmentOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AssessmentOrBuilder.java index 475f3798bd61..025d0d6b0324 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AssessmentOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AssessmentOrBuilder.java @@ -28,7 +28,7 @@ public interface AssessmentOrBuilder * *
    * Output only. The resource name for the Assessment in the format
-   * "projects/{project}/assessments/{assessment}".
+   * `projects/{project}/assessments/{assessment}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -41,7 +41,7 @@ public interface AssessmentOrBuilder * *
    * Output only. The resource name for the Assessment in the format
-   * "projects/{project}/assessments/{assessment}".
+   * `projects/{project}/assessments/{assessment}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -300,6 +300,51 @@ public interface AssessmentOrBuilder com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerificationOrBuilder getPrivatePasswordLeakVerificationOrBuilder(); + /** + * + * + *
+   * Assessment returned when firewall policies belonging to the project are
+   * evaluated using the field firewall_policy_evaluation.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + * + * @return Whether the firewallPolicyAssessment field is set. + */ + boolean hasFirewallPolicyAssessment(); + /** + * + * + *
+   * Assessment returned when firewall policies belonging to the project are
+   * evaluated using the field firewall_policy_evaluation.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + * + * @return The firewallPolicyAssessment. + */ + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment getFirewallPolicyAssessment(); + /** + * + * + *
+   * Assessment returned when firewall policies belonging to the project are
+   * evaluated using the field firewall_policy_evaluation.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10; + * + */ + com.google.recaptchaenterprise.v1.FirewallPolicyAssessmentOrBuilder + getFirewallPolicyAssessmentOrBuilder(); + /** * * @@ -341,4 +386,48 @@ public interface AssessmentOrBuilder */ com.google.recaptchaenterprise.v1.FraudPreventionAssessmentOrBuilder getFraudPreventionAssessmentOrBuilder(); + + /** + * + * + *
+   * Output only. Fraud Signals specific to the users involved in a payment
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the fraudSignals field is set. + */ + boolean hasFraudSignals(); + /** + * + * + *
+   * Output only. Fraud Signals specific to the users involved in a payment
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fraudSignals. + */ + com.google.recaptchaenterprise.v1.FraudSignals getFraudSignals(); + /** + * + * + *
+   * Output only. Fraud Signals specific to the users involved in a payment
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.recaptchaenterprise.v1.FraudSignalsOrBuilder getFraudSignalsOrBuilder(); } diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateAssessmentRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateAssessmentRequest.java index f91501f6b6aa..dfc24b8044ee 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateAssessmentRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateAssessmentRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the project in which the assessment will be created,
-   * in the format "projects/{project}".
+   * in the format `projects/{project}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getParent() { * *
    * Required. The name of the project in which the assessment will be created,
-   * in the format "projects/{project}".
+   * in the format `projects/{project}`.
    * 
* * @@ -555,7 +555,7 @@ public Builder mergeFrom( * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project}".
+     * in the format `projects/{project}`.
      * 
* * @@ -580,7 +580,7 @@ public java.lang.String getParent() { * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project}".
+     * in the format `projects/{project}`.
      * 
* * @@ -605,7 +605,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project}".
+     * in the format `projects/{project}`.
      * 
* * @@ -629,7 +629,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project}".
+     * in the format `projects/{project}`.
      * 
* * @@ -649,7 +649,7 @@ public Builder clearParent() { * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project}".
+     * in the format `projects/{project}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateAssessmentRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateAssessmentRequestOrBuilder.java index a0e421d50cdc..2711a486909e 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateAssessmentRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateAssessmentRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface CreateAssessmentRequestOrBuilder * *
    * Required. The name of the project in which the assessment will be created,
-   * in the format "projects/{project}".
+   * in the format `projects/{project}`.
    * 
* * @@ -43,7 +43,7 @@ public interface CreateAssessmentRequestOrBuilder * *
    * Required. The name of the project in which the assessment will be created,
-   * in the format "projects/{project}".
+   * in the format `projects/{project}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateFirewallPolicyRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateFirewallPolicyRequest.java new file mode 100644 index 000000000000..6c5e3b81c99e --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateFirewallPolicyRequest.java @@ -0,0 +1,941 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * The create firewall policy request message.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest} + */ +public final class CreateFirewallPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest) + CreateFirewallPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateFirewallPolicyRequest.newBuilder() to construct. + private CreateFirewallPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateFirewallPolicyRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateFirewallPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest.class, + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the project this policy will apply to, in the format
+   * `projects/{project}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the project this policy will apply to, in the format
+   * `projects/{project}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIREWALL_POLICY_FIELD_NUMBER = 2; + private com.google.recaptchaenterprise.v1.FirewallPolicy firewallPolicy_; + /** + * + * + *
+   * Required. Information to create the policy.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the firewallPolicy field is set. + */ + @java.lang.Override + public boolean hasFirewallPolicy() { + return firewallPolicy_ != null; + } + /** + * + * + *
+   * Required. Information to create the policy.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The firewallPolicy. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy() { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } + /** + * + * + *
+   * Required. Information to create the policy.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPolicyOrBuilder() { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (firewallPolicy_ != null) { + output.writeMessage(2, getFirewallPolicy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (firewallPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFirewallPolicy()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest other = + (com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasFirewallPolicy() != other.hasFirewallPolicy()) return false; + if (hasFirewallPolicy()) { + if (!getFirewallPolicy().equals(other.getFirewallPolicy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasFirewallPolicy()) { + hash = (37 * hash) + FIREWALL_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getFirewallPolicy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The create firewall policy request message.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest) + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest.class, + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + firewallPolicy_ = null; + if (firewallPolicyBuilder_ != null) { + firewallPolicyBuilder_.dispose(); + firewallPolicyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest build() { + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest buildPartial() { + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest result = + new com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.firewallPolicy_ = + firewallPolicyBuilder_ == null ? firewallPolicy_ : firewallPolicyBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest) { + return mergeFrom((com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest other) { + if (other + == com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFirewallPolicy()) { + mergeFirewallPolicy(other.getFirewallPolicy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getFirewallPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the project this policy will apply to, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the project this policy will apply to, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the project this policy will apply to, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the project this policy will apply to, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the project this policy will apply to, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.recaptchaenterprise.v1.FirewallPolicy firewallPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder> + firewallPolicyBuilder_; + /** + * + * + *
+     * Required. Information to create the policy.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the firewallPolicy field is set. + */ + public boolean hasFirewallPolicy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Information to create the policy.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The firewallPolicy. + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy() { + if (firewallPolicyBuilder_ == null) { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } else { + return firewallPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Information to create the policy.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFirewallPolicy(com.google.recaptchaenterprise.v1.FirewallPolicy value) { + if (firewallPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firewallPolicy_ = value; + } else { + firewallPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Information to create the policy.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFirewallPolicy( + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder builderForValue) { + if (firewallPolicyBuilder_ == null) { + firewallPolicy_ = builderForValue.build(); + } else { + firewallPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Information to create the policy.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFirewallPolicy(com.google.recaptchaenterprise.v1.FirewallPolicy value) { + if (firewallPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && firewallPolicy_ != null + && firewallPolicy_ + != com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance()) { + getFirewallPolicyBuilder().mergeFrom(value); + } else { + firewallPolicy_ = value; + } + } else { + firewallPolicyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Information to create the policy.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFirewallPolicy() { + bitField0_ = (bitField0_ & ~0x00000002); + firewallPolicy_ = null; + if (firewallPolicyBuilder_ != null) { + firewallPolicyBuilder_.dispose(); + firewallPolicyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Information to create the policy.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy.Builder getFirewallPolicyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFirewallPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Information to create the policy.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPolicyOrBuilder() { + if (firewallPolicyBuilder_ != null) { + return firewallPolicyBuilder_.getMessageOrBuilder(); + } else { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } + } + /** + * + * + *
+     * Required. Information to create the policy.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder> + getFirewallPolicyFieldBuilder() { + if (firewallPolicyBuilder_ == null) { + firewallPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder>( + getFirewallPolicy(), getParentForChildren(), isClean()); + firewallPolicy_ = null; + } + return firewallPolicyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest) + private static final com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest(); + } + + public static com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFirewallPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateFirewallPolicyRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateFirewallPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..504aed905a88 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateFirewallPolicyRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface CreateFirewallPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the project this policy will apply to, in the format
+   * `projects/{project}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the project this policy will apply to, in the format
+   * `projects/{project}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Information to create the policy.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the firewallPolicy field is set. + */ + boolean hasFirewallPolicy(); + /** + * + * + *
+   * Required. Information to create the policy.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The firewallPolicy. + */ + com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy(); + /** + * + * + *
+   * Required. Information to create the policy.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPolicyOrBuilder(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateKeyRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateKeyRequest.java index d83bfefd25a0..d1b969d031d3 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateKeyRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateKeyRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the project in which the key will be created, in the
-   * format "projects/{project}".
+   * format `projects/{project}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getParent() { * *
    * Required. The name of the project in which the key will be created, in the
-   * format "projects/{project}".
+   * format `projects/{project}`.
    * 
* * @@ -550,7 +550,7 @@ public Builder mergeFrom( * *
      * Required. The name of the project in which the key will be created, in the
-     * format "projects/{project}".
+     * format `projects/{project}`.
      * 
* * @@ -575,7 +575,7 @@ public java.lang.String getParent() { * *
      * Required. The name of the project in which the key will be created, in the
-     * format "projects/{project}".
+     * format `projects/{project}`.
      * 
* * @@ -600,7 +600,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The name of the project in which the key will be created, in the
-     * format "projects/{project}".
+     * format `projects/{project}`.
      * 
* * @@ -624,7 +624,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The name of the project in which the key will be created, in the
-     * format "projects/{project}".
+     * format `projects/{project}`.
      * 
* * @@ -644,7 +644,7 @@ public Builder clearParent() { * *
      * Required. The name of the project in which the key will be created, in the
-     * format "projects/{project}".
+     * format `projects/{project}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateKeyRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateKeyRequestOrBuilder.java index 3e1c65b6958c..af5223037f4a 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateKeyRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/CreateKeyRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface CreateKeyRequestOrBuilder * *
    * Required. The name of the project in which the key will be created, in the
-   * format "projects/{project}".
+   * format `projects/{project}`.
    * 
* * @@ -43,7 +43,7 @@ public interface CreateKeyRequestOrBuilder * *
    * Required. The name of the project in which the key will be created, in the
-   * format "projects/{project}".
+   * format `projects/{project}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteFirewallPolicyRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteFirewallPolicyRequest.java new file mode 100644 index 000000000000..fd5f491b10d6 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteFirewallPolicyRequest.java @@ -0,0 +1,650 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * The delete firewall policy request message.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest} + */ +public final class DeleteFirewallPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest) + DeleteFirewallPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteFirewallPolicyRequest.newBuilder() to construct. + private DeleteFirewallPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteFirewallPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteFirewallPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest.class, + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the policy to be deleted, in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the policy to be deleted, in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest other = + (com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The delete firewall policy request message.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest) + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest.class, + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest build() { + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest buildPartial() { + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest result = + new com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest) { + return mergeFrom((com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest other) { + if (other + == com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the policy to be deleted, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the policy to be deleted, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the policy to be deleted, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the policy to be deleted, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the policy to be deleted, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest) + private static final com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest(); + } + + public static com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFirewallPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteFirewallPolicyRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteFirewallPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..14bbb582f36b --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteFirewallPolicyRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface DeleteFirewallPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the policy to be deleted, in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the policy to be deleted, in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteKeyRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteKeyRequest.java index 5e5b52e29cae..c4aca67819e4 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteKeyRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteKeyRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the key to be deleted, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * Required. The name of the key to be deleted, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * @@ -467,7 +467,7 @@ public Builder mergeFrom( * *
      * Required. The name of the key to be deleted, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -492,7 +492,7 @@ public java.lang.String getName() { * *
      * Required. The name of the key to be deleted, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -517,7 +517,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The name of the key to be deleted, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -541,7 +541,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The name of the key to be deleted, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -561,7 +561,7 @@ public Builder clearName() { * *
      * Required. The name of the key to be deleted, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteKeyRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteKeyRequestOrBuilder.java index 5d2fe3b502c4..5a7e4729bb7c 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteKeyRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/DeleteKeyRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface DeleteKeyRequestOrBuilder * *
    * Required. The name of the key to be deleted, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * @@ -43,7 +43,7 @@ public interface DeleteKeyRequestOrBuilder * *
    * Required. The name of the key to be deleted, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Event.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Event.java index 9ab562f8dbb7..fa3c2f1354f7 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Event.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Event.java @@ -44,6 +44,9 @@ private Event() { userIpAddress_ = ""; expectedAction_ = ""; hashedAccountId_ = com.google.protobuf.ByteString.EMPTY; + requestedUri_ = ""; + ja3_ = ""; + headers_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -353,6 +356,232 @@ public com.google.protobuf.ByteString getHashedAccountId() { return hashedAccountId_; } + public static final int EXPRESS_FIELD_NUMBER = 14; + private boolean express_ = false; + /** + * + * + *
+   * 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.
+   * 
+ * + * bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The express. + */ + @java.lang.Override + public boolean getExpress() { + return express_; + } + + public static final int REQUESTED_URI_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestedUri_ = ""; + /** + * + * + *
+   * Optional. The URI resource the user requested that triggered an assessment.
+   * 
+ * + * string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestedUri. + */ + @java.lang.Override + public java.lang.String getRequestedUri() { + java.lang.Object ref = requestedUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestedUri_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The URI resource the user requested that triggered an assessment.
+   * 
+ * + * string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestedUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestedUriBytes() { + java.lang.Object ref = requestedUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestedUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WAF_TOKEN_ASSESSMENT_FIELD_NUMBER = 9; + private boolean wafTokenAssessment_ = false; + /** + * + * + *
+   * Optional. Flag for running WAF token assessment.
+   * If enabled, the token must be specified, and have been created by a
+   * WAF-enabled key.
+   * 
+ * + * bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wafTokenAssessment. + */ + @java.lang.Override + public boolean getWafTokenAssessment() { + return wafTokenAssessment_; + } + + public static final int JA3_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object ja3_ = ""; + /** + * + * + *
+   * Optional. Optional JA3 fingerprint for SSL clients.
+   * 
+ * + * string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ja3. + */ + @java.lang.Override + public java.lang.String getJa3() { + java.lang.Object ref = ja3_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ja3_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Optional JA3 fingerprint for SSL clients.
+   * 
+ * + * string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ja3. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJa3Bytes() { + java.lang.Object ref = ja3_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ja3_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADERS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList headers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. HTTP header information about the request.
+   * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the headers. + */ + public com.google.protobuf.ProtocolStringList getHeadersList() { + return headers_; + } + /** + * + * + *
+   * Optional. HTTP header information about the request.
+   * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of headers. + */ + public int getHeadersCount() { + return headers_.size(); + } + /** + * + * + *
+   * Optional. HTTP header information about the request.
+   * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The headers at the given index. + */ + public java.lang.String getHeaders(int index) { + return headers_.get(index); + } + /** + * + * + *
+   * Optional. HTTP header information about the request.
+   * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the headers at the given index. + */ + public com.google.protobuf.ByteString getHeadersBytes(int index) { + return headers_.getByteString(index); + } + + public static final int FIREWALL_POLICY_EVALUATION_FIELD_NUMBER = 12; + private boolean firewallPolicyEvaluation_ = false; + /** + * + * + *
+   * 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.
+   * 
+ * + * bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The firewallPolicyEvaluation. + */ + @java.lang.Override + public boolean getFirewallPolicyEvaluation() { + return firewallPolicyEvaluation_; + } + public static final int TRANSACTION_DATA_FIELD_NUMBER = 13; private com.google.recaptchaenterprise.v1.TransactionData transactionData_; /** @@ -447,9 +676,27 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!hashedAccountId_.isEmpty()) { output.writeBytes(6, hashedAccountId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestedUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, requestedUri_); + } + if (wafTokenAssessment_ != false) { + output.writeBool(9, wafTokenAssessment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ja3_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ja3_); + } + for (int i = 0; i < headers_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, headers_.getRaw(i)); + } + if (firewallPolicyEvaluation_ != false) { + output.writeBool(12, firewallPolicyEvaluation_); + } if (transactionData_ != null) { output.writeMessage(13, getTransactionData()); } + if (express_ != false) { + output.writeBool(14, express_); + } getUnknownFields().writeTo(output); } @@ -477,9 +724,32 @@ public int getSerializedSize() { if (!hashedAccountId_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(6, hashedAccountId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestedUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, requestedUri_); + } + if (wafTokenAssessment_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, wafTokenAssessment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ja3_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, ja3_); + } + { + int dataSize = 0; + for (int i = 0; i < headers_.size(); i++) { + dataSize += computeStringSizeNoTag(headers_.getRaw(i)); + } + size += dataSize; + size += 1 * getHeadersList().size(); + } + if (firewallPolicyEvaluation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, firewallPolicyEvaluation_); + } if (transactionData_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getTransactionData()); } + if (express_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, express_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -501,6 +771,12 @@ public boolean equals(final java.lang.Object obj) { if (!getUserIpAddress().equals(other.getUserIpAddress())) return false; if (!getExpectedAction().equals(other.getExpectedAction())) return false; if (!getHashedAccountId().equals(other.getHashedAccountId())) return false; + if (getExpress() != other.getExpress()) return false; + if (!getRequestedUri().equals(other.getRequestedUri())) return false; + if (getWafTokenAssessment() != other.getWafTokenAssessment()) return false; + if (!getJa3().equals(other.getJa3())) return false; + if (!getHeadersList().equals(other.getHeadersList())) return false; + if (getFirewallPolicyEvaluation() != other.getFirewallPolicyEvaluation()) return false; if (hasTransactionData() != other.hasTransactionData()) return false; if (hasTransactionData()) { if (!getTransactionData().equals(other.getTransactionData())) return false; @@ -528,6 +804,20 @@ public int hashCode() { hash = (53 * hash) + getExpectedAction().hashCode(); hash = (37 * hash) + HASHED_ACCOUNT_ID_FIELD_NUMBER; hash = (53 * hash) + getHashedAccountId().hashCode(); + hash = (37 * hash) + EXPRESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpress()); + hash = (37 * hash) + REQUESTED_URI_FIELD_NUMBER; + hash = (53 * hash) + getRequestedUri().hashCode(); + hash = (37 * hash) + WAF_TOKEN_ASSESSMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWafTokenAssessment()); + hash = (37 * hash) + JA3_FIELD_NUMBER; + hash = (53 * hash) + getJa3().hashCode(); + if (getHeadersCount() > 0) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getHeadersList().hashCode(); + } + hash = (37 * hash) + FIREWALL_POLICY_EVALUATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFirewallPolicyEvaluation()); if (hasTransactionData()) { hash = (37 * hash) + TRANSACTION_DATA_FIELD_NUMBER; hash = (53 * hash) + getTransactionData().hashCode(); @@ -677,6 +967,12 @@ public Builder clear() { userIpAddress_ = ""; expectedAction_ = ""; hashedAccountId_ = com.google.protobuf.ByteString.EMPTY; + express_ = false; + requestedUri_ = ""; + wafTokenAssessment_ = false; + ja3_ = ""; + headers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + firewallPolicyEvaluation_ = false; transactionData_ = null; if (transactionDataBuilder_ != null) { transactionDataBuilder_.dispose(); @@ -737,6 +1033,25 @@ private void buildPartial0(com.google.recaptchaenterprise.v1.Event result) { result.hashedAccountId_ = hashedAccountId_; } if (((from_bitField0_ & 0x00000040) != 0)) { + result.express_ = express_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.requestedUri_ = requestedUri_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.wafTokenAssessment_ = wafTokenAssessment_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.ja3_ = ja3_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + headers_.makeImmutable(); + result.headers_ = headers_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.firewallPolicyEvaluation_ = firewallPolicyEvaluation_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { result.transactionData_ = transactionDataBuilder_ == null ? transactionData_ : transactionDataBuilder_.build(); } @@ -815,6 +1130,35 @@ public Builder mergeFrom(com.google.recaptchaenterprise.v1.Event other) { if (other.getHashedAccountId() != com.google.protobuf.ByteString.EMPTY) { setHashedAccountId(other.getHashedAccountId()); } + if (other.getExpress() != false) { + setExpress(other.getExpress()); + } + if (!other.getRequestedUri().isEmpty()) { + requestedUri_ = other.requestedUri_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.getWafTokenAssessment() != false) { + setWafTokenAssessment(other.getWafTokenAssessment()); + } + if (!other.getJa3().isEmpty()) { + ja3_ = other.ja3_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.headers_.isEmpty()) { + if (headers_.isEmpty()) { + headers_ = other.headers_; + bitField0_ |= 0x00000400; + } else { + ensureHeadersIsMutable(); + headers_.addAll(other.headers_); + } + onChanged(); + } + if (other.getFirewallPolicyEvaluation() != false) { + setFirewallPolicyEvaluation(other.getFirewallPolicyEvaluation()); + } if (other.hasTransactionData()) { mergeTransactionData(other.getTransactionData()); } @@ -880,12 +1224,49 @@ public Builder mergeFrom( bitField0_ |= 0x00000020; break; } // case 50 + case 66: + { + requestedUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + wafTokenAssessment_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + ja3_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHeadersIsMutable(); + headers_.add(s); + break; + } // case 90 + case 96: + { + firewallPolicyEvaluation_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 96 case 106: { input.readMessage(getTransactionDataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00001000; break; } // case 106 + case 112: + { + express_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 112 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1523,101 +1904,664 @@ public Builder clearHashedAccountId() { return this; } - private com.google.recaptchaenterprise.v1.TransactionData transactionData_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.recaptchaenterprise.v1.TransactionData, - com.google.recaptchaenterprise.v1.TransactionData.Builder, - com.google.recaptchaenterprise.v1.TransactionDataOrBuilder> - transactionDataBuilder_; + private boolean express_; /** * * *
-     * Optional. Data describing a payment transaction to be assessed. Sending
-     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
-     * FraudPreventionAssessment component in the response.
+     * 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.
      * 
* - * - * .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; - * + * bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @return Whether the transactionData field is set. + * @return The express. */ - public boolean hasTransactionData() { - return ((bitField0_ & 0x00000040) != 0); + @java.lang.Override + public boolean getExpress() { + return express_; } /** * * *
-     * Optional. Data describing a payment transaction to be assessed. Sending
-     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
-     * FraudPreventionAssessment component in the response.
+     * 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.
      * 
* - * - * .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; - * + * bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The transactionData. + * @param value The express to set. + * @return This builder for chaining. */ - public com.google.recaptchaenterprise.v1.TransactionData getTransactionData() { - if (transactionDataBuilder_ == null) { - return transactionData_ == null - ? com.google.recaptchaenterprise.v1.TransactionData.getDefaultInstance() - : transactionData_; - } else { - return transactionDataBuilder_.getMessage(); - } + public Builder setExpress(boolean value) { + + express_ = value; + bitField0_ |= 0x00000040; + onChanged(); + 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.
+     * 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.
      * 
* - * - * .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; - * + * bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public Builder setTransactionData(com.google.recaptchaenterprise.v1.TransactionData value) { - if (transactionDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transactionData_ = value; - } else { - transactionDataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; + public Builder clearExpress() { + bitField0_ = (bitField0_ & ~0x00000040); + express_ = false; onChanged(); return this; } + + private java.lang.Object requestedUri_ = ""; /** * * *
-     * Optional. Data describing a payment transaction to be assessed. Sending
-     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
-     * FraudPreventionAssessment component in the response.
+     * Optional. The URI resource the user requested that triggered an assessment.
      * 
* - * - * .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; - * + * string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestedUri. */ - public Builder setTransactionData( - com.google.recaptchaenterprise.v1.TransactionData.Builder builderForValue) { - if (transactionDataBuilder_ == null) { - transactionData_ = builderForValue.build(); + public java.lang.String getRequestedUri() { + java.lang.Object ref = requestedUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestedUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The URI resource the user requested that triggered an assessment.
+     * 
+ * + * string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestedUri. + */ + public com.google.protobuf.ByteString getRequestedUriBytes() { + java.lang.Object ref = requestedUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestedUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The URI resource the user requested that triggered an assessment.
+     * 
+ * + * string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestedUri to set. + * @return This builder for chaining. + */ + public Builder setRequestedUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestedUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URI resource the user requested that triggered an assessment.
+     * 
+ * + * string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedUri() { + requestedUri_ = getDefaultInstance().getRequestedUri(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URI resource the user requested that triggered an assessment.
+     * 
+ * + * string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestedUri to set. + * @return This builder for chaining. + */ + public Builder setRequestedUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestedUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private boolean wafTokenAssessment_; + /** + * + * + *
+     * Optional. Flag for running WAF token assessment.
+     * If enabled, the token must be specified, and have been created by a
+     * WAF-enabled key.
+     * 
+ * + * bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wafTokenAssessment. + */ + @java.lang.Override + public boolean getWafTokenAssessment() { + return wafTokenAssessment_; + } + /** + * + * + *
+     * Optional. Flag for running WAF token assessment.
+     * If enabled, the token must be specified, and have been created by a
+     * WAF-enabled key.
+     * 
+ * + * bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The wafTokenAssessment to set. + * @return This builder for chaining. + */ + public Builder setWafTokenAssessment(boolean value) { + + wafTokenAssessment_ = value; + bitField0_ |= 0x00000100; + onChanged(); + 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.
+     * 
+ * + * bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearWafTokenAssessment() { + bitField0_ = (bitField0_ & ~0x00000100); + wafTokenAssessment_ = false; + onChanged(); + return this; + } + + private java.lang.Object ja3_ = ""; + /** + * + * + *
+     * Optional. Optional JA3 fingerprint for SSL clients.
+     * 
+ * + * string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ja3. + */ + public java.lang.String getJa3() { + java.lang.Object ref = ja3_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ja3_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Optional JA3 fingerprint for SSL clients.
+     * 
+ * + * string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ja3. + */ + public com.google.protobuf.ByteString getJa3Bytes() { + java.lang.Object ref = ja3_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ja3_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Optional JA3 fingerprint for SSL clients.
+     * 
+ * + * string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ja3 to set. + * @return This builder for chaining. + */ + public Builder setJa3(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ja3_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional JA3 fingerprint for SSL clients.
+     * 
+ * + * string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearJa3() { + ja3_ = getDefaultInstance().getJa3(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional JA3 fingerprint for SSL clients.
+     * 
+ * + * string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for ja3 to set. + * @return This builder for chaining. + */ + public Builder setJa3Bytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ja3_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList headers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureHeadersIsMutable() { + if (!headers_.isModifiable()) { + headers_ = new com.google.protobuf.LazyStringArrayList(headers_); + } + bitField0_ |= 0x00000400; + } + /** + * + * + *
+     * Optional. HTTP header information about the request.
+     * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the headers. + */ + public com.google.protobuf.ProtocolStringList getHeadersList() { + headers_.makeImmutable(); + return headers_; + } + /** + * + * + *
+     * Optional. HTTP header information about the request.
+     * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of headers. + */ + public int getHeadersCount() { + return headers_.size(); + } + /** + * + * + *
+     * Optional. HTTP header information about the request.
+     * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The headers at the given index. + */ + public java.lang.String getHeaders(int index) { + return headers_.get(index); + } + /** + * + * + *
+     * Optional. HTTP header information about the request.
+     * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the headers at the given index. + */ + public com.google.protobuf.ByteString getHeadersBytes(int index) { + return headers_.getByteString(index); + } + /** + * + * + *
+     * Optional. HTTP header information about the request.
+     * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The headers to set. + * @return This builder for chaining. + */ + public Builder setHeaders(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.set(index, value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. HTTP header information about the request.
+     * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The headers to add. + * @return This builder for chaining. + */ + public Builder addHeaders(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. HTTP header information about the request.
+     * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The headers to add. + * @return This builder for chaining. + */ + public Builder addAllHeaders(java.lang.Iterable values) { + ensureHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headers_); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. HTTP header information about the request.
+     * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearHeaders() { + headers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. HTTP header information about the request.
+     * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the headers to add. + * @return This builder for chaining. + */ + public Builder addHeadersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHeadersIsMutable(); + headers_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private boolean firewallPolicyEvaluation_; + /** + * + * + *
+     * 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.
+     * 
+ * + * bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The firewallPolicyEvaluation. + */ + @java.lang.Override + public boolean getFirewallPolicyEvaluation() { + return firewallPolicyEvaluation_; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The firewallPolicyEvaluation to set. + * @return This builder for chaining. + */ + public Builder setFirewallPolicyEvaluation(boolean value) { + + firewallPolicyEvaluation_ = value; + bitField0_ |= 0x00000800; + onChanged(); + 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.
+     * 
+ * + * bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFirewallPolicyEvaluation() { + bitField0_ = (bitField0_ & ~0x00000800); + firewallPolicyEvaluation_ = false; + onChanged(); + return this; + } + + private com.google.recaptchaenterprise.v1.TransactionData transactionData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.TransactionData, + com.google.recaptchaenterprise.v1.TransactionData.Builder, + com.google.recaptchaenterprise.v1.TransactionDataOrBuilder> + transactionDataBuilder_; + /** + * + * + *
+     * Optional. Data describing a payment transaction to be assessed. Sending
+     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
+     * FraudPreventionAssessment component in the response.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the transactionData field is set. + */ + public boolean hasTransactionData() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Optional. Data describing a payment transaction to be assessed. Sending
+     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
+     * FraudPreventionAssessment component in the response.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transactionData. + */ + public com.google.recaptchaenterprise.v1.TransactionData getTransactionData() { + if (transactionDataBuilder_ == null) { + return transactionData_ == null + ? com.google.recaptchaenterprise.v1.TransactionData.getDefaultInstance() + : transactionData_; + } else { + return transactionDataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Data describing a payment transaction to be assessed. Sending
+     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
+     * FraudPreventionAssessment component in the response.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTransactionData(com.google.recaptchaenterprise.v1.TransactionData value) { + if (transactionDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transactionData_ = value; + } else { + transactionDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTransactionData( + com.google.recaptchaenterprise.v1.TransactionData.Builder builderForValue) { + if (transactionDataBuilder_ == null) { + transactionData_ = builderForValue.build(); } else { transactionDataBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -1636,7 +2580,7 @@ public Builder setTransactionData( */ public Builder mergeTransactionData(com.google.recaptchaenterprise.v1.TransactionData value) { if (transactionDataBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00001000) != 0) && transactionData_ != null && transactionData_ != com.google.recaptchaenterprise.v1.TransactionData.getDefaultInstance()) { @@ -1647,7 +2591,7 @@ public Builder mergeTransactionData(com.google.recaptchaenterprise.v1.Transactio } else { transactionDataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -1665,7 +2609,7 @@ public Builder mergeTransactionData(com.google.recaptchaenterprise.v1.Transactio *
*/ public Builder clearTransactionData() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00001000); transactionData_ = null; if (transactionDataBuilder_ != null) { transactionDataBuilder_.dispose(); @@ -1688,7 +2632,7 @@ public Builder clearTransactionData() { *
*/ public com.google.recaptchaenterprise.v1.TransactionData.Builder getTransactionDataBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00001000; onChanged(); return getTransactionDataFieldBuilder().getBuilder(); } diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/EventOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/EventOrBuilder.java index 0fde9a726f22..8a8ce7556541 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/EventOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/EventOrBuilder.java @@ -174,6 +174,152 @@ public interface EventOrBuilder */ com.google.protobuf.ByteString getHashedAccountId(); + /** + * + * + *
+   * 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.
+   * 
+ * + * bool express = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The express. + */ + boolean getExpress(); + + /** + * + * + *
+   * Optional. The URI resource the user requested that triggered an assessment.
+   * 
+ * + * string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestedUri. + */ + java.lang.String getRequestedUri(); + /** + * + * + *
+   * Optional. The URI resource the user requested that triggered an assessment.
+   * 
+ * + * string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestedUri. + */ + com.google.protobuf.ByteString getRequestedUriBytes(); + + /** + * + * + *
+   * Optional. Flag for running WAF token assessment.
+   * If enabled, the token must be specified, and have been created by a
+   * WAF-enabled key.
+   * 
+ * + * bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wafTokenAssessment. + */ + boolean getWafTokenAssessment(); + + /** + * + * + *
+   * Optional. Optional JA3 fingerprint for SSL clients.
+   * 
+ * + * string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ja3. + */ + java.lang.String getJa3(); + /** + * + * + *
+   * Optional. Optional JA3 fingerprint for SSL clients.
+   * 
+ * + * string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ja3. + */ + com.google.protobuf.ByteString getJa3Bytes(); + + /** + * + * + *
+   * Optional. HTTP header information about the request.
+   * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the headers. + */ + java.util.List getHeadersList(); + /** + * + * + *
+   * Optional. HTTP header information about the request.
+   * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of headers. + */ + int getHeadersCount(); + /** + * + * + *
+   * Optional. HTTP header information about the request.
+   * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The headers at the given index. + */ + java.lang.String getHeaders(int index); + /** + * + * + *
+   * Optional. HTTP header information about the request.
+   * 
+ * + * repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the headers at the given index. + */ + com.google.protobuf.ByteString getHeadersBytes(int index); + + /** + * + * + *
+   * 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.
+   * 
+ * + * bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The firewallPolicyEvaluation. + */ + boolean getFirewallPolicyEvaluation(); + /** * * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallAction.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallAction.java new file mode 100644 index 000000000000..05599c10ef15 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallAction.java @@ -0,0 +1,4978 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * An individual action. Each action represents what to do if a policy
+ * matches.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction} + */ +public final class FirewallAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FirewallAction) + FirewallActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirewallAction.newBuilder() to construct. + private FirewallAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FirewallAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FirewallAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.Builder.class); + } + + public interface AllowActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * An allow action continues processing a request unimpeded.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction} + */ + public static final class AllowAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction) + AllowActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AllowAction.newBuilder() to construct. + private AllowAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AllowAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AllowAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FirewallAction.AllowAction)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction other = + (com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An allow action continues processing a request unimpeded.
+     * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction) + com.google.recaptchaenterprise.v1.FirewallAction.AllowActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.AllowAction + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.AllowAction build() { + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.AllowAction buildPartial() { + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction result = + new com.google.recaptchaenterprise.v1.FirewallAction.AllowAction(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) { + return mergeFrom((com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.FirewallAction.AllowAction other) { + if (other + == com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction) + private static final com.google.recaptchaenterprise.v1.FirewallAction.AllowAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FirewallAction.AllowAction(); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.AllowAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllowAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.AllowAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BlockActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * A block action serves an HTTP error code a prevents the request from
+   * hitting the backend.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction} + */ + public static final class BlockAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction) + BlockActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use BlockAction.newBuilder() to construct. + private BlockAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BlockAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BlockAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FirewallAction.BlockAction)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction other = + (com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A block action serves an HTTP error code a prevents the request from
+     * hitting the backend.
+     * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction) + com.google.recaptchaenterprise.v1.FirewallAction.BlockActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.BlockAction + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.BlockAction build() { + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.BlockAction buildPartial() { + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction result = + new com.google.recaptchaenterprise.v1.FirewallAction.BlockAction(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) { + return mergeFrom((com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.FirewallAction.BlockAction other) { + if (other + == com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction) + private static final com.google.recaptchaenterprise.v1.FirewallAction.BlockAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FirewallAction.BlockAction(); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.BlockAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BlockAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.BlockAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RedirectActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * A redirect action returns a 307 (temporary redirect) response, pointing
+   * the user to a ReCaptcha interstitial page to attach a token.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction} + */ + public static final class RedirectAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction) + RedirectActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use RedirectAction.newBuilder() to construct. + private RedirectAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RedirectAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RedirectAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction other = + (com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A redirect action returns a 307 (temporary redirect) response, pointing
+     * the user to a ReCaptcha interstitial page to attach a token.
+     * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction) + com.google.recaptchaenterprise.v1.FirewallAction.RedirectActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.Builder.class); + } + + // Construct using + // com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction build() { + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction buildPartial() { + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction result = + new com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) { + return mergeFrom((com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction other) { + if (other + == com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction) + private static final com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction(); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RedirectAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubstituteActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The address to redirect to. The target is a relative path in the
+     * current host. Example: "/blog/404.html".
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+     * The address to redirect to. The target is a relative path in the
+     * current host. Example: "/blog/404.html".
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + } + /** + * + * + *
+   * A substitute action transparently serves a different page than the one
+   * requested.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction} + */ + public static final class SubstituteAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + SubstituteActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubstituteAction.newBuilder() to construct. + private SubstituteAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubstituteAction() { + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubstituteAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + * + * + *
+     * The address to redirect to. The target is a relative path in the
+     * current host. Example: "/blog/404.html".
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+     * The address to redirect to. The target is a relative path in the
+     * current host. Example: "/blog/404.html".
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction other = + (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) obj; + + if (!getPath().equals(other.getPath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A substitute action transparently serves a different page than the one
+     * requested.
+     * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.Builder.class); + } + + // Construct using + // com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + path_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction build() { + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction buildPartial() { + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction result = + new com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.path_ = path_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) { + return mergeFrom( + (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction other) { + if (other + == com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + .getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object path_ = ""; + /** + * + * + *
+       * The address to redirect to. The target is a relative path in the
+       * current host. Example: "/blog/404.html".
+       * 
+ * + * string path = 1; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The address to redirect to. The target is a relative path in the
+       * current host. Example: "/blog/404.html".
+       * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The address to redirect to. The target is a relative path in the
+       * current host. Example: "/blog/404.html".
+       * 
+ * + * string path = 1; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The address to redirect to. The target is a relative path in the
+       * current host. Example: "/blog/404.html".
+       * 
+ * + * string path = 1; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The address to redirect to. The target is a relative path in the
+       * current host. Example: "/blog/404.html".
+       * 
+ * + * string path = 1; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + private static final com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction(); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubstituteAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SetHeaderActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The header key to set in the request to the backend server.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+     * The header key to set in the request to the backend server.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+     * The header value to set in the request to the backend server.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * The header value to set in the request to the backend server.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + } + /** + * + * + *
+   * A set header action sets a header and forwards the request to the
+   * backend. This can be used to trigger custom protection implemented on the
+   * backend.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction} + */ + public static final class SetHeaderAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + SetHeaderActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetHeaderAction.newBuilder() to construct. + private SetHeaderAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SetHeaderAction() { + key_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SetHeaderAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+     * The header key to set in the request to the backend server.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * + * + *
+     * The header key to set in the request to the backend server.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * + * + *
+     * The header value to set in the request to the backend server.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * The header value to set in the request to the backend server.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction other = + (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A set header action sets a header and forwards the request to the
+     * backend. This can be used to trigger custom protection implemented on the
+     * backend.
+     * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.Builder.class); + } + + // Construct using + // com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction build() { + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction buildPartial() { + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction result = + new com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) { + return mergeFrom( + (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction other) { + if (other + == com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + .getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * + * + *
+       * The header key to set in the request to the backend server.
+       * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The header key to set in the request to the backend server.
+       * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The header key to set in the request to the backend server.
+       * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The header key to set in the request to the backend server.
+       * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The header key to set in the request to the backend server.
+       * 
+ * + * string key = 1; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * The header value to set in the request to the backend server.
+       * 
+ * + * string value = 2; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The header value to set in the request to the backend server.
+       * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The header value to set in the request to the backend server.
+       * 
+ * + * string value = 2; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The header value to set in the request to the backend server.
+       * 
+ * + * string value = 2; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The header value to set in the request to the backend server.
+       * 
+ * + * string value = 2; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + private static final com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction(); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetHeaderAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int firewallActionOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object firewallActionOneof_; + + public enum FirewallActionOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ALLOW(1), + BLOCK(2), + REDIRECT(5), + SUBSTITUTE(3), + SET_HEADER(4), + FIREWALLACTIONONEOF_NOT_SET(0); + private final int value; + + private FirewallActionOneofCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FirewallActionOneofCase valueOf(int value) { + return forNumber(value); + } + + public static FirewallActionOneofCase forNumber(int value) { + switch (value) { + case 1: + return ALLOW; + case 2: + return BLOCK; + case 5: + return REDIRECT; + case 3: + return SUBSTITUTE; + case 4: + return SET_HEADER; + case 0: + return FIREWALLACTIONONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public FirewallActionOneofCase getFirewallActionOneofCase() { + return FirewallActionOneofCase.forNumber(firewallActionOneofCase_); + } + + public static final int ALLOW_FIELD_NUMBER = 1; + /** + * + * + *
+   * The user request did not match any policy and should be allowed
+   * access to the requested resource.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + * + * @return Whether the allow field is set. + */ + @java.lang.Override + public boolean hasAllow() { + return firewallActionOneofCase_ == 1; + } + /** + * + * + *
+   * The user request did not match any policy and should be allowed
+   * access to the requested resource.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + * + * @return The allow. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.AllowAction getAllow() { + if (firewallActionOneofCase_ == 1) { + return (com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.getDefaultInstance(); + } + /** + * + * + *
+   * The user request did not match any policy and should be allowed
+   * access to the requested resource.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.AllowActionOrBuilder getAllowOrBuilder() { + if (firewallActionOneofCase_ == 1) { + return (com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.getDefaultInstance(); + } + + public static final int BLOCK_FIELD_NUMBER = 2; + /** + * + * + *
+   * This action will deny access to a given page. The user will get an HTTP
+   * error code.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + * + * @return Whether the block field is set. + */ + @java.lang.Override + public boolean hasBlock() { + return firewallActionOneofCase_ == 2; + } + /** + * + * + *
+   * This action will deny access to a given page. The user will get an HTTP
+   * error code.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.BlockAction getBlock() { + if (firewallActionOneofCase_ == 2) { + return (com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.getDefaultInstance(); + } + /** + * + * + *
+   * This action will deny access to a given page. The user will get an HTTP
+   * error code.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.BlockActionOrBuilder getBlockOrBuilder() { + if (firewallActionOneofCase_ == 2) { + return (com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.getDefaultInstance(); + } + + public static final int REDIRECT_FIELD_NUMBER = 5; + /** + * + * + *
+   * This action will redirect the request to a ReCaptcha interstitial to
+   * attach a token.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + * + * @return Whether the redirect field is set. + */ + @java.lang.Override + public boolean hasRedirect() { + return firewallActionOneofCase_ == 5; + } + /** + * + * + *
+   * This action will redirect the request to a ReCaptcha interstitial to
+   * attach a token.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + * + * @return The redirect. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction getRedirect() { + if (firewallActionOneofCase_ == 5) { + return (com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.getDefaultInstance(); + } + /** + * + * + *
+   * This action will redirect the request to a ReCaptcha interstitial to
+   * attach a token.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.RedirectActionOrBuilder + getRedirectOrBuilder() { + if (firewallActionOneofCase_ == 5) { + return (com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.getDefaultInstance(); + } + + public static final int SUBSTITUTE_FIELD_NUMBER = 3; + /** + * + * + *
+   * This action will transparently serve a different page to an offending
+   * user.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + * + * @return Whether the substitute field is set. + */ + @java.lang.Override + public boolean hasSubstitute() { + return firewallActionOneofCase_ == 3; + } + /** + * + * + *
+   * This action will transparently serve a different page to an offending
+   * user.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + * + * @return The substitute. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction getSubstitute() { + if (firewallActionOneofCase_ == 3) { + return (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.getDefaultInstance(); + } + /** + * + * + *
+   * This action will transparently serve a different page to an offending
+   * user.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SubstituteActionOrBuilder + getSubstituteOrBuilder() { + if (firewallActionOneofCase_ == 3) { + return (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.getDefaultInstance(); + } + + public static final int SET_HEADER_FIELD_NUMBER = 4; + /** + * + * + *
+   * This action will set a custom header but allow the request to continue
+   * to the customer backend.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + * + * @return Whether the setHeader field is set. + */ + @java.lang.Override + public boolean hasSetHeader() { + return firewallActionOneofCase_ == 4; + } + /** + * + * + *
+   * This action will set a custom header but allow the request to continue
+   * to the customer backend.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + * + * @return The setHeader. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction getSetHeader() { + if (firewallActionOneofCase_ == 4) { + return (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.getDefaultInstance(); + } + /** + * + * + *
+   * This action will set a custom header but allow the request to continue
+   * to the customer backend.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderActionOrBuilder + getSetHeaderOrBuilder() { + if (firewallActionOneofCase_ == 4) { + return (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (firewallActionOneofCase_ == 1) { + output.writeMessage( + 1, (com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) firewallActionOneof_); + } + if (firewallActionOneofCase_ == 2) { + output.writeMessage( + 2, (com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) firewallActionOneof_); + } + if (firewallActionOneofCase_ == 3) { + output.writeMessage( + 3, + (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) firewallActionOneof_); + } + if (firewallActionOneofCase_ == 4) { + output.writeMessage( + 4, + (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) firewallActionOneof_); + } + if (firewallActionOneofCase_ == 5) { + output.writeMessage( + 5, + (com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) firewallActionOneof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (firewallActionOneofCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) firewallActionOneof_); + } + if (firewallActionOneofCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) firewallActionOneof_); + } + if (firewallActionOneofCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + firewallActionOneof_); + } + if (firewallActionOneofCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + firewallActionOneof_); + } + if (firewallActionOneofCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) + firewallActionOneof_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FirewallAction)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FirewallAction other = + (com.google.recaptchaenterprise.v1.FirewallAction) obj; + + if (!getFirewallActionOneofCase().equals(other.getFirewallActionOneofCase())) return false; + switch (firewallActionOneofCase_) { + case 1: + if (!getAllow().equals(other.getAllow())) return false; + break; + case 2: + if (!getBlock().equals(other.getBlock())) return false; + break; + case 5: + if (!getRedirect().equals(other.getRedirect())) return false; + break; + case 3: + if (!getSubstitute().equals(other.getSubstitute())) return false; + break; + case 4: + if (!getSetHeader().equals(other.getSetHeader())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (firewallActionOneofCase_) { + case 1: + hash = (37 * hash) + ALLOW_FIELD_NUMBER; + hash = (53 * hash) + getAllow().hashCode(); + break; + case 2: + hash = (37 * hash) + BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getBlock().hashCode(); + break; + case 5: + hash = (37 * hash) + REDIRECT_FIELD_NUMBER; + hash = (53 * hash) + getRedirect().hashCode(); + break; + case 3: + hash = (37 * hash) + SUBSTITUTE_FIELD_NUMBER; + hash = (53 * hash) + getSubstitute().hashCode(); + break; + case 4: + hash = (37 * hash) + SET_HEADER_FIELD_NUMBER; + hash = (53 * hash) + getSetHeader().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.recaptchaenterprise.v1.FirewallAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An individual action. Each action represents what to do if a policy
+   * matches.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FirewallAction) + com.google.recaptchaenterprise.v1.FirewallActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallAction.class, + com.google.recaptchaenterprise.v1.FirewallAction.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.FirewallAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (allowBuilder_ != null) { + allowBuilder_.clear(); + } + if (blockBuilder_ != null) { + blockBuilder_.clear(); + } + if (redirectBuilder_ != null) { + redirectBuilder_.clear(); + } + if (substituteBuilder_ != null) { + substituteBuilder_.clear(); + } + if (setHeaderBuilder_ != null) { + setHeaderBuilder_.clear(); + } + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FirewallAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction build() { + com.google.recaptchaenterprise.v1.FirewallAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction buildPartial() { + com.google.recaptchaenterprise.v1.FirewallAction result = + new com.google.recaptchaenterprise.v1.FirewallAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.recaptchaenterprise.v1.FirewallAction result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.recaptchaenterprise.v1.FirewallAction result) { + result.firewallActionOneofCase_ = firewallActionOneofCase_; + result.firewallActionOneof_ = this.firewallActionOneof_; + if (firewallActionOneofCase_ == 1 && allowBuilder_ != null) { + result.firewallActionOneof_ = allowBuilder_.build(); + } + if (firewallActionOneofCase_ == 2 && blockBuilder_ != null) { + result.firewallActionOneof_ = blockBuilder_.build(); + } + if (firewallActionOneofCase_ == 5 && redirectBuilder_ != null) { + result.firewallActionOneof_ = redirectBuilder_.build(); + } + if (firewallActionOneofCase_ == 3 && substituteBuilder_ != null) { + result.firewallActionOneof_ = substituteBuilder_.build(); + } + if (firewallActionOneofCase_ == 4 && setHeaderBuilder_ != null) { + result.firewallActionOneof_ = setHeaderBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FirewallAction) { + return mergeFrom((com.google.recaptchaenterprise.v1.FirewallAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.FirewallAction other) { + if (other == com.google.recaptchaenterprise.v1.FirewallAction.getDefaultInstance()) + return this; + switch (other.getFirewallActionOneofCase()) { + case ALLOW: + { + mergeAllow(other.getAllow()); + break; + } + case BLOCK: + { + mergeBlock(other.getBlock()); + break; + } + case REDIRECT: + { + mergeRedirect(other.getRedirect()); + break; + } + case SUBSTITUTE: + { + mergeSubstitute(other.getSubstitute()); + break; + } + case SET_HEADER: + { + mergeSetHeader(other.getSetHeader()); + break; + } + case FIREWALLACTIONONEOF_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAllowFieldBuilder().getBuilder(), extensionRegistry); + firewallActionOneofCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getBlockFieldBuilder().getBuilder(), extensionRegistry); + firewallActionOneofCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getSubstituteFieldBuilder().getBuilder(), extensionRegistry); + firewallActionOneofCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getSetHeaderFieldBuilder().getBuilder(), extensionRegistry); + firewallActionOneofCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getRedirectFieldBuilder().getBuilder(), extensionRegistry); + firewallActionOneofCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int firewallActionOneofCase_ = 0; + private java.lang.Object firewallActionOneof_; + + public FirewallActionOneofCase getFirewallActionOneofCase() { + return FirewallActionOneofCase.forNumber(firewallActionOneofCase_); + } + + public Builder clearFirewallActionOneof() { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction, + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.AllowActionOrBuilder> + allowBuilder_; + /** + * + * + *
+     * The user request did not match any policy and should be allowed
+     * access to the requested resource.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + * + * @return Whether the allow field is set. + */ + @java.lang.Override + public boolean hasAllow() { + return firewallActionOneofCase_ == 1; + } + /** + * + * + *
+     * The user request did not match any policy and should be allowed
+     * access to the requested resource.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + * + * @return The allow. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.AllowAction getAllow() { + if (allowBuilder_ == null) { + if (firewallActionOneofCase_ == 1) { + return (com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.getDefaultInstance(); + } else { + if (firewallActionOneofCase_ == 1) { + return allowBuilder_.getMessage(); + } + return com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * The user request did not match any policy and should be allowed
+     * access to the requested resource.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + */ + public Builder setAllow(com.google.recaptchaenterprise.v1.FirewallAction.AllowAction value) { + if (allowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firewallActionOneof_ = value; + onChanged(); + } else { + allowBuilder_.setMessage(value); + } + firewallActionOneofCase_ = 1; + return this; + } + /** + * + * + *
+     * The user request did not match any policy and should be allowed
+     * access to the requested resource.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + */ + public Builder setAllow( + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.Builder builderForValue) { + if (allowBuilder_ == null) { + firewallActionOneof_ = builderForValue.build(); + onChanged(); + } else { + allowBuilder_.setMessage(builderForValue.build()); + } + firewallActionOneofCase_ = 1; + return this; + } + /** + * + * + *
+     * The user request did not match any policy and should be allowed
+     * access to the requested resource.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + */ + public Builder mergeAllow(com.google.recaptchaenterprise.v1.FirewallAction.AllowAction value) { + if (allowBuilder_ == null) { + if (firewallActionOneofCase_ == 1 + && firewallActionOneof_ + != com.google.recaptchaenterprise.v1.FirewallAction.AllowAction + .getDefaultInstance()) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.newBuilder( + (com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) + firewallActionOneof_) + .mergeFrom(value) + .buildPartial(); + } else { + firewallActionOneof_ = value; + } + onChanged(); + } else { + if (firewallActionOneofCase_ == 1) { + allowBuilder_.mergeFrom(value); + } else { + allowBuilder_.setMessage(value); + } + } + firewallActionOneofCase_ = 1; + return this; + } + /** + * + * + *
+     * The user request did not match any policy and should be allowed
+     * access to the requested resource.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + */ + public Builder clearAllow() { + if (allowBuilder_ == null) { + if (firewallActionOneofCase_ == 1) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + onChanged(); + } + } else { + if (firewallActionOneofCase_ == 1) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + } + allowBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The user request did not match any policy and should be allowed
+     * access to the requested resource.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + */ + public com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.Builder getAllowBuilder() { + return getAllowFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The user request did not match any policy and should be allowed
+     * access to the requested resource.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.AllowActionOrBuilder + getAllowOrBuilder() { + if ((firewallActionOneofCase_ == 1) && (allowBuilder_ != null)) { + return allowBuilder_.getMessageOrBuilder(); + } else { + if (firewallActionOneofCase_ == 1) { + return (com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * The user request did not match any policy and should be allowed
+     * access to the requested resource.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction, + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.AllowActionOrBuilder> + getAllowFieldBuilder() { + if (allowBuilder_ == null) { + if (!(firewallActionOneofCase_ == 1)) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.getDefaultInstance(); + } + allowBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction, + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.AllowActionOrBuilder>( + (com.google.recaptchaenterprise.v1.FirewallAction.AllowAction) firewallActionOneof_, + getParentForChildren(), + isClean()); + firewallActionOneof_ = null; + } + firewallActionOneofCase_ = 1; + onChanged(); + return allowBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction, + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.BlockActionOrBuilder> + blockBuilder_; + /** + * + * + *
+     * This action will deny access to a given page. The user will get an HTTP
+     * error code.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + * + * @return Whether the block field is set. + */ + @java.lang.Override + public boolean hasBlock() { + return firewallActionOneofCase_ == 2; + } + /** + * + * + *
+     * This action will deny access to a given page. The user will get an HTTP
+     * error code.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + * + * @return The block. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.BlockAction getBlock() { + if (blockBuilder_ == null) { + if (firewallActionOneofCase_ == 2) { + return (com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.getDefaultInstance(); + } else { + if (firewallActionOneofCase_ == 2) { + return blockBuilder_.getMessage(); + } + return com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * This action will deny access to a given page. The user will get an HTTP
+     * error code.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + */ + public Builder setBlock(com.google.recaptchaenterprise.v1.FirewallAction.BlockAction value) { + if (blockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firewallActionOneof_ = value; + onChanged(); + } else { + blockBuilder_.setMessage(value); + } + firewallActionOneofCase_ = 2; + return this; + } + /** + * + * + *
+     * This action will deny access to a given page. The user will get an HTTP
+     * error code.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + */ + public Builder setBlock( + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.Builder builderForValue) { + if (blockBuilder_ == null) { + firewallActionOneof_ = builderForValue.build(); + onChanged(); + } else { + blockBuilder_.setMessage(builderForValue.build()); + } + firewallActionOneofCase_ = 2; + return this; + } + /** + * + * + *
+     * This action will deny access to a given page. The user will get an HTTP
+     * error code.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + */ + public Builder mergeBlock(com.google.recaptchaenterprise.v1.FirewallAction.BlockAction value) { + if (blockBuilder_ == null) { + if (firewallActionOneofCase_ == 2 + && firewallActionOneof_ + != com.google.recaptchaenterprise.v1.FirewallAction.BlockAction + .getDefaultInstance()) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.newBuilder( + (com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) + firewallActionOneof_) + .mergeFrom(value) + .buildPartial(); + } else { + firewallActionOneof_ = value; + } + onChanged(); + } else { + if (firewallActionOneofCase_ == 2) { + blockBuilder_.mergeFrom(value); + } else { + blockBuilder_.setMessage(value); + } + } + firewallActionOneofCase_ = 2; + return this; + } + /** + * + * + *
+     * This action will deny access to a given page. The user will get an HTTP
+     * error code.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + */ + public Builder clearBlock() { + if (blockBuilder_ == null) { + if (firewallActionOneofCase_ == 2) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + onChanged(); + } + } else { + if (firewallActionOneofCase_ == 2) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + } + blockBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * This action will deny access to a given page. The user will get an HTTP
+     * error code.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + */ + public com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.Builder getBlockBuilder() { + return getBlockFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This action will deny access to a given page. The user will get an HTTP
+     * error code.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.BlockActionOrBuilder + getBlockOrBuilder() { + if ((firewallActionOneofCase_ == 2) && (blockBuilder_ != null)) { + return blockBuilder_.getMessageOrBuilder(); + } else { + if (firewallActionOneofCase_ == 2) { + return (com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * This action will deny access to a given page. The user will get an HTTP
+     * error code.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction, + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.BlockActionOrBuilder> + getBlockFieldBuilder() { + if (blockBuilder_ == null) { + if (!(firewallActionOneofCase_ == 2)) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.getDefaultInstance(); + } + blockBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction, + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.BlockActionOrBuilder>( + (com.google.recaptchaenterprise.v1.FirewallAction.BlockAction) firewallActionOneof_, + getParentForChildren(), + isClean()); + firewallActionOneof_ = null; + } + firewallActionOneofCase_ = 2; + onChanged(); + return blockBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction, + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.RedirectActionOrBuilder> + redirectBuilder_; + /** + * + * + *
+     * This action will redirect the request to a ReCaptcha interstitial to
+     * attach a token.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + * + * @return Whether the redirect field is set. + */ + @java.lang.Override + public boolean hasRedirect() { + return firewallActionOneofCase_ == 5; + } + /** + * + * + *
+     * This action will redirect the request to a ReCaptcha interstitial to
+     * attach a token.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + * + * @return The redirect. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction getRedirect() { + if (redirectBuilder_ == null) { + if (firewallActionOneofCase_ == 5) { + return (com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.getDefaultInstance(); + } else { + if (firewallActionOneofCase_ == 5) { + return redirectBuilder_.getMessage(); + } + return com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * This action will redirect the request to a ReCaptcha interstitial to
+     * attach a token.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + */ + public Builder setRedirect( + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction value) { + if (redirectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firewallActionOneof_ = value; + onChanged(); + } else { + redirectBuilder_.setMessage(value); + } + firewallActionOneofCase_ = 5; + return this; + } + /** + * + * + *
+     * This action will redirect the request to a ReCaptcha interstitial to
+     * attach a token.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + */ + public Builder setRedirect( + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.Builder builderForValue) { + if (redirectBuilder_ == null) { + firewallActionOneof_ = builderForValue.build(); + onChanged(); + } else { + redirectBuilder_.setMessage(builderForValue.build()); + } + firewallActionOneofCase_ = 5; + return this; + } + /** + * + * + *
+     * This action will redirect the request to a ReCaptcha interstitial to
+     * attach a token.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + */ + public Builder mergeRedirect( + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction value) { + if (redirectBuilder_ == null) { + if (firewallActionOneofCase_ == 5 + && firewallActionOneof_ + != com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction + .getDefaultInstance()) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.newBuilder( + (com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) + firewallActionOneof_) + .mergeFrom(value) + .buildPartial(); + } else { + firewallActionOneof_ = value; + } + onChanged(); + } else { + if (firewallActionOneofCase_ == 5) { + redirectBuilder_.mergeFrom(value); + } else { + redirectBuilder_.setMessage(value); + } + } + firewallActionOneofCase_ = 5; + return this; + } + /** + * + * + *
+     * This action will redirect the request to a ReCaptcha interstitial to
+     * attach a token.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + */ + public Builder clearRedirect() { + if (redirectBuilder_ == null) { + if (firewallActionOneofCase_ == 5) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + onChanged(); + } + } else { + if (firewallActionOneofCase_ == 5) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + } + redirectBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * This action will redirect the request to a ReCaptcha interstitial to
+     * attach a token.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + */ + public com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.Builder + getRedirectBuilder() { + return getRedirectFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This action will redirect the request to a ReCaptcha interstitial to
+     * attach a token.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.RedirectActionOrBuilder + getRedirectOrBuilder() { + if ((firewallActionOneofCase_ == 5) && (redirectBuilder_ != null)) { + return redirectBuilder_.getMessageOrBuilder(); + } else { + if (firewallActionOneofCase_ == 5) { + return (com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * This action will redirect the request to a ReCaptcha interstitial to
+     * attach a token.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction, + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.RedirectActionOrBuilder> + getRedirectFieldBuilder() { + if (redirectBuilder_ == null) { + if (!(firewallActionOneofCase_ == 5)) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.getDefaultInstance(); + } + redirectBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction, + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.RedirectActionOrBuilder>( + (com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction) + firewallActionOneof_, + getParentForChildren(), + isClean()); + firewallActionOneof_ = null; + } + firewallActionOneofCase_ = 5; + onChanged(); + return redirectBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction, + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteActionOrBuilder> + substituteBuilder_; + /** + * + * + *
+     * This action will transparently serve a different page to an offending
+     * user.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + * + * @return Whether the substitute field is set. + */ + @java.lang.Override + public boolean hasSubstitute() { + return firewallActionOneofCase_ == 3; + } + /** + * + * + *
+     * This action will transparently serve a different page to an offending
+     * user.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + * + * @return The substitute. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction getSubstitute() { + if (substituteBuilder_ == null) { + if (firewallActionOneofCase_ == 3) { + return (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + .getDefaultInstance(); + } else { + if (firewallActionOneofCase_ == 3) { + return substituteBuilder_.getMessage(); + } + return com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * This action will transparently serve a different page to an offending
+     * user.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + */ + public Builder setSubstitute( + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction value) { + if (substituteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firewallActionOneof_ = value; + onChanged(); + } else { + substituteBuilder_.setMessage(value); + } + firewallActionOneofCase_ = 3; + return this; + } + /** + * + * + *
+     * This action will transparently serve a different page to an offending
+     * user.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + */ + public Builder setSubstitute( + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.Builder builderForValue) { + if (substituteBuilder_ == null) { + firewallActionOneof_ = builderForValue.build(); + onChanged(); + } else { + substituteBuilder_.setMessage(builderForValue.build()); + } + firewallActionOneofCase_ = 3; + return this; + } + /** + * + * + *
+     * This action will transparently serve a different page to an offending
+     * user.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + */ + public Builder mergeSubstitute( + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction value) { + if (substituteBuilder_ == null) { + if (firewallActionOneofCase_ == 3 + && firewallActionOneof_ + != com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + .getDefaultInstance()) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.newBuilder( + (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + firewallActionOneof_) + .mergeFrom(value) + .buildPartial(); + } else { + firewallActionOneof_ = value; + } + onChanged(); + } else { + if (firewallActionOneofCase_ == 3) { + substituteBuilder_.mergeFrom(value); + } else { + substituteBuilder_.setMessage(value); + } + } + firewallActionOneofCase_ = 3; + return this; + } + /** + * + * + *
+     * This action will transparently serve a different page to an offending
+     * user.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + */ + public Builder clearSubstitute() { + if (substituteBuilder_ == null) { + if (firewallActionOneofCase_ == 3) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + onChanged(); + } + } else { + if (firewallActionOneofCase_ == 3) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + } + substituteBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * This action will transparently serve a different page to an offending
+     * user.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + */ + public com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.Builder + getSubstituteBuilder() { + return getSubstituteFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This action will transparently serve a different page to an offending
+     * user.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SubstituteActionOrBuilder + getSubstituteOrBuilder() { + if ((firewallActionOneofCase_ == 3) && (substituteBuilder_ != null)) { + return substituteBuilder_.getMessageOrBuilder(); + } else { + if (firewallActionOneofCase_ == 3) { + return (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * This action will transparently serve a different page to an offending
+     * user.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction, + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteActionOrBuilder> + getSubstituteFieldBuilder() { + if (substituteBuilder_ == null) { + if (!(firewallActionOneofCase_ == 3)) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction + .getDefaultInstance(); + } + substituteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction, + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteActionOrBuilder>( + (com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction) + firewallActionOneof_, + getParentForChildren(), + isClean()); + firewallActionOneof_ = null; + } + firewallActionOneofCase_ = 3; + onChanged(); + return substituteBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction, + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderActionOrBuilder> + setHeaderBuilder_; + /** + * + * + *
+     * This action will set a custom header but allow the request to continue
+     * to the customer backend.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + * + * @return Whether the setHeader field is set. + */ + @java.lang.Override + public boolean hasSetHeader() { + return firewallActionOneofCase_ == 4; + } + /** + * + * + *
+     * This action will set a custom header but allow the request to continue
+     * to the customer backend.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + * + * @return The setHeader. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction getSetHeader() { + if (setHeaderBuilder_ == null) { + if (firewallActionOneofCase_ == 4) { + return (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + .getDefaultInstance(); + } else { + if (firewallActionOneofCase_ == 4) { + return setHeaderBuilder_.getMessage(); + } + return com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * This action will set a custom header but allow the request to continue
+     * to the customer backend.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + */ + public Builder setSetHeader( + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction value) { + if (setHeaderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firewallActionOneof_ = value; + onChanged(); + } else { + setHeaderBuilder_.setMessage(value); + } + firewallActionOneofCase_ = 4; + return this; + } + /** + * + * + *
+     * This action will set a custom header but allow the request to continue
+     * to the customer backend.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + */ + public Builder setSetHeader( + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.Builder builderForValue) { + if (setHeaderBuilder_ == null) { + firewallActionOneof_ = builderForValue.build(); + onChanged(); + } else { + setHeaderBuilder_.setMessage(builderForValue.build()); + } + firewallActionOneofCase_ = 4; + return this; + } + /** + * + * + *
+     * This action will set a custom header but allow the request to continue
+     * to the customer backend.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + */ + public Builder mergeSetHeader( + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction value) { + if (setHeaderBuilder_ == null) { + if (firewallActionOneofCase_ == 4 + && firewallActionOneof_ + != com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + .getDefaultInstance()) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.newBuilder( + (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + firewallActionOneof_) + .mergeFrom(value) + .buildPartial(); + } else { + firewallActionOneof_ = value; + } + onChanged(); + } else { + if (firewallActionOneofCase_ == 4) { + setHeaderBuilder_.mergeFrom(value); + } else { + setHeaderBuilder_.setMessage(value); + } + } + firewallActionOneofCase_ = 4; + return this; + } + /** + * + * + *
+     * This action will set a custom header but allow the request to continue
+     * to the customer backend.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + */ + public Builder clearSetHeader() { + if (setHeaderBuilder_ == null) { + if (firewallActionOneofCase_ == 4) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + onChanged(); + } + } else { + if (firewallActionOneofCase_ == 4) { + firewallActionOneofCase_ = 0; + firewallActionOneof_ = null; + } + setHeaderBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * This action will set a custom header but allow the request to continue
+     * to the customer backend.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + */ + public com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.Builder + getSetHeaderBuilder() { + return getSetHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This action will set a custom header but allow the request to continue
+     * to the customer backend.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderActionOrBuilder + getSetHeaderOrBuilder() { + if ((firewallActionOneofCase_ == 4) && (setHeaderBuilder_ != null)) { + return setHeaderBuilder_.getMessageOrBuilder(); + } else { + if (firewallActionOneofCase_ == 4) { + return (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + firewallActionOneof_; + } + return com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * This action will set a custom header but allow the request to continue
+     * to the customer backend.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction, + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderActionOrBuilder> + getSetHeaderFieldBuilder() { + if (setHeaderBuilder_ == null) { + if (!(firewallActionOneofCase_ == 4)) { + firewallActionOneof_ = + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.getDefaultInstance(); + } + setHeaderBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction, + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction.Builder, + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderActionOrBuilder>( + (com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction) + firewallActionOneof_, + getParentForChildren(), + isClean()); + firewallActionOneof_ = null; + } + firewallActionOneofCase_ = 4; + onChanged(); + return setHeaderBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FirewallAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FirewallAction) + private static final com.google.recaptchaenterprise.v1.FirewallAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FirewallAction(); + } + + public static com.google.recaptchaenterprise.v1.FirewallAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FirewallAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallActionOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallActionOrBuilder.java new file mode 100644 index 000000000000..718f49c6bc82 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallActionOrBuilder.java @@ -0,0 +1,225 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface FirewallActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FirewallAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The user request did not match any policy and should be allowed
+   * access to the requested resource.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + * + * @return Whether the allow field is set. + */ + boolean hasAllow(); + /** + * + * + *
+   * The user request did not match any policy and should be allowed
+   * access to the requested resource.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + * + * @return The allow. + */ + com.google.recaptchaenterprise.v1.FirewallAction.AllowAction getAllow(); + /** + * + * + *
+   * The user request did not match any policy and should be allowed
+   * access to the requested resource.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.AllowAction allow = 1; + */ + com.google.recaptchaenterprise.v1.FirewallAction.AllowActionOrBuilder getAllowOrBuilder(); + + /** + * + * + *
+   * This action will deny access to a given page. The user will get an HTTP
+   * error code.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + * + * @return Whether the block field is set. + */ + boolean hasBlock(); + /** + * + * + *
+   * This action will deny access to a given page. The user will get an HTTP
+   * error code.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + * + * @return The block. + */ + com.google.recaptchaenterprise.v1.FirewallAction.BlockAction getBlock(); + /** + * + * + *
+   * This action will deny access to a given page. The user will get an HTTP
+   * error code.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.BlockAction block = 2; + */ + com.google.recaptchaenterprise.v1.FirewallAction.BlockActionOrBuilder getBlockOrBuilder(); + + /** + * + * + *
+   * This action will redirect the request to a ReCaptcha interstitial to
+   * attach a token.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + * + * @return Whether the redirect field is set. + */ + boolean hasRedirect(); + /** + * + * + *
+   * This action will redirect the request to a ReCaptcha interstitial to
+   * attach a token.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + * + * @return The redirect. + */ + com.google.recaptchaenterprise.v1.FirewallAction.RedirectAction getRedirect(); + /** + * + * + *
+   * This action will redirect the request to a ReCaptcha interstitial to
+   * attach a token.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.RedirectAction redirect = 5; + */ + com.google.recaptchaenterprise.v1.FirewallAction.RedirectActionOrBuilder getRedirectOrBuilder(); + + /** + * + * + *
+   * This action will transparently serve a different page to an offending
+   * user.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + * + * @return Whether the substitute field is set. + */ + boolean hasSubstitute(); + /** + * + * + *
+   * This action will transparently serve a different page to an offending
+   * user.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + * + * @return The substitute. + */ + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteAction getSubstitute(); + /** + * + * + *
+   * This action will transparently serve a different page to an offending
+   * user.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SubstituteAction substitute = 3; + * + */ + com.google.recaptchaenterprise.v1.FirewallAction.SubstituteActionOrBuilder + getSubstituteOrBuilder(); + + /** + * + * + *
+   * This action will set a custom header but allow the request to continue
+   * to the customer backend.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + * + * @return Whether the setHeader field is set. + */ + boolean hasSetHeader(); + /** + * + * + *
+   * This action will set a custom header but allow the request to continue
+   * to the customer backend.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + * + * @return The setHeader. + */ + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderAction getSetHeader(); + /** + * + * + *
+   * This action will set a custom header but allow the request to continue
+   * to the customer backend.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.FirewallAction.SetHeaderAction set_header = 4; + * + */ + com.google.recaptchaenterprise.v1.FirewallAction.SetHeaderActionOrBuilder getSetHeaderOrBuilder(); + + com.google.recaptchaenterprise.v1.FirewallAction.FirewallActionOneofCase + getFirewallActionOneofCase(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicy.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicy.java new file mode 100644 index 000000000000..3b2f70350eed --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicy.java @@ -0,0 +1,1868 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * A FirewallPolicy represents a single matching pattern and resulting actions
+ * to take.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallPolicy} + */ +public final class FirewallPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FirewallPolicy) + FirewallPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirewallPolicy.newBuilder() to construct. + private FirewallPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FirewallPolicy() { + name_ = ""; + description_ = ""; + path_ = ""; + condition_ = ""; + actions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FirewallPolicy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallPolicy.class, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The resource name for the FirewallPolicy in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name for the FirewallPolicy in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A description of what this policy aims to achieve, for convenience
+   * purposes. The description can at most include 256 UTF-8 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A description of what this policy aims to achieve, for convenience
+   * purposes. The description can at most include 256 UTF-8 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + * + * + *
+   * 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.
+   * 
+ * + * string path = 4; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * 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.
+   * 
+ * + * string path = 4; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object 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
+   * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).
+   * A condition has a max length of 500 characters.
+   * 
+ * + * string condition = 5; + * + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } + } + /** + * + * + *
+   * 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.
+   * 
+ * + * string condition = 5; + * + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List actions_; + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallAction getActions(int index) { + return actions_.get(index); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallActionOrBuilder getActionsOrBuilder(int index) { + return actions_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, condition_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(6, actions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, path_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, condition_); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, actions_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FirewallPolicy)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FirewallPolicy other = + (com.google.recaptchaenterprise.v1.FirewallPolicy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getPath().equals(other.getPath())) return false; + if (!getCondition().equals(other.getCondition())) return false; + if (!getActionsList().equals(other.getActionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.recaptchaenterprise.v1.FirewallPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A FirewallPolicy represents a single matching pattern and resulting actions
+   * to take.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FirewallPolicy) + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallPolicy.class, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.FirewallPolicy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + path_ = ""; + condition_ = ""; + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicy getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicy build() { + com.google.recaptchaenterprise.v1.FirewallPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicy buildPartial() { + com.google.recaptchaenterprise.v1.FirewallPolicy result = + new com.google.recaptchaenterprise.v1.FirewallPolicy(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.recaptchaenterprise.v1.FirewallPolicy result) { + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.recaptchaenterprise.v1.FirewallPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.path_ = path_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.condition_ = condition_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FirewallPolicy) { + return mergeFrom((com.google.recaptchaenterprise.v1.FirewallPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.FirewallPolicy other) { + if (other == com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000010); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getActionsFieldBuilder() + : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + condition_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + com.google.recaptchaenterprise.v1.FirewallAction m = + input.readMessage( + com.google.recaptchaenterprise.v1.FirewallAction.parser(), + extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name for the FirewallPolicy in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name for the FirewallPolicy in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name for the FirewallPolicy in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the FirewallPolicy in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name for the FirewallPolicy in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of what this policy aims to achieve, for convenience
+     * purposes. The description can at most include 256 UTF-8 characters.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of what this policy aims to achieve, for convenience
+     * purposes. The description can at most include 256 UTF-8 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of what this policy aims to achieve, for convenience
+     * purposes. The description can at most include 256 UTF-8 characters.
+     * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of what this policy aims to achieve, for convenience
+     * purposes. The description can at most include 256 UTF-8 characters.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of what this policy aims to achieve, for convenience
+     * purposes. The description can at most include 256 UTF-8 characters.
+     * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * 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.
+     * 
+ * + * string path = 4; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string path = 4; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string path = 4; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string path = 4; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string path = 4; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object 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
+     * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).
+     * A condition has a max length of 500 characters.
+     * 
+ * + * string condition = 5; + * + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string condition = 5; + * + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string condition = 5; + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string condition = 5; + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + condition_ = getDefaultInstance().getCondition(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * string condition = 5; + * + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + condition_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + actions_ = + new java.util.ArrayList(actions_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction, + com.google.recaptchaenterprise.v1.FirewallAction.Builder, + com.google.recaptchaenterprise.v1.FirewallActionOrBuilder> + actionsBuilder_; + + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public com.google.recaptchaenterprise.v1.FirewallAction getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public Builder setActions(int index, com.google.recaptchaenterprise.v1.FirewallAction value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public Builder setActions( + int index, com.google.recaptchaenterprise.v1.FirewallAction.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public Builder addActions(com.google.recaptchaenterprise.v1.FirewallAction value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public Builder addActions(int index, com.google.recaptchaenterprise.v1.FirewallAction value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public Builder addActions( + com.google.recaptchaenterprise.v1.FirewallAction.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public Builder addActions( + int index, com.google.recaptchaenterprise.v1.FirewallAction.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public com.google.recaptchaenterprise.v1.FirewallAction.Builder getActionsBuilder(int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public com.google.recaptchaenterprise.v1.FirewallActionOrBuilder getActionsOrBuilder( + int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public com.google.recaptchaenterprise.v1.FirewallAction.Builder addActionsBuilder() { + return getActionsFieldBuilder() + .addBuilder(com.google.recaptchaenterprise.v1.FirewallAction.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public com.google.recaptchaenterprise.v1.FirewallAction.Builder addActionsBuilder(int index) { + return getActionsFieldBuilder() + .addBuilder(index, com.google.recaptchaenterprise.v1.FirewallAction.getDefaultInstance()); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction, + com.google.recaptchaenterprise.v1.FirewallAction.Builder, + com.google.recaptchaenterprise.v1.FirewallActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallAction, + com.google.recaptchaenterprise.v1.FirewallAction.Builder, + com.google.recaptchaenterprise.v1.FirewallActionOrBuilder>( + actions_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + actions_ = null; + } + return actionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FirewallPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FirewallPolicy) + private static final com.google.recaptchaenterprise.v1.FirewallPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FirewallPolicy(); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FirewallPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyAssessment.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyAssessment.java new file mode 100644 index 000000000000..115b7b6ada0c --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyAssessment.java @@ -0,0 +1,1020 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * Policy config assessment.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment} + */ +public final class FirewallPolicyAssessment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment) + FirewallPolicyAssessmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirewallPolicyAssessment.newBuilder() to construct. + private FirewallPolicyAssessment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FirewallPolicyAssessment() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FirewallPolicyAssessment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.class, + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.Builder.class); + } + + public static final int ERROR_FIELD_NUMBER = 5; + private com.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.
+   * 
+ * + * .google.rpc.Status error = 5; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * If the processing of a policy config fails, an error will be populated
+   * and the firewall_policy will be left empty.
+   * 
+ * + * .google.rpc.Status error = 5; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * If the processing of a policy config fails, an error will be populated
+   * and the firewall_policy will be left empty.
+   * 
+ * + * .google.rpc.Status error = 5; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + public static final int FIREWALL_POLICY_FIELD_NUMBER = 8; + private com.google.recaptchaenterprise.v1.FirewallPolicy firewallPolicy_; + /** + * + * + *
+   * 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.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the firewallPolicy field is set. + */ + @java.lang.Override + public boolean hasFirewallPolicy() { + return firewallPolicy_ != 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.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firewallPolicy. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy() { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPolicyOrBuilder() { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (error_ != null) { + output.writeMessage(5, getError()); + } + if (firewallPolicy_ != null) { + output.writeMessage(8, getFirewallPolicy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getError()); + } + if (firewallPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getFirewallPolicy()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FirewallPolicyAssessment)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment other = + (com.google.recaptchaenterprise.v1.FirewallPolicyAssessment) obj; + + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (hasFirewallPolicy() != other.hasFirewallPolicy()) return false; + if (hasFirewallPolicy()) { + if (!getFirewallPolicy().equals(other.getFirewallPolicy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasFirewallPolicy()) { + hash = (37 * hash) + FIREWALL_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getFirewallPolicy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Policy config assessment.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment) + com.google.recaptchaenterprise.v1.FirewallPolicyAssessmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.class, + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + firewallPolicy_ = null; + if (firewallPolicyBuilder_ != null) { + firewallPolicyBuilder_.dispose(); + firewallPolicyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyAssessment getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyAssessment build() { + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyAssessment buildPartial() { + com.google.recaptchaenterprise.v1.FirewallPolicyAssessment result = + new com.google.recaptchaenterprise.v1.FirewallPolicyAssessment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.recaptchaenterprise.v1.FirewallPolicyAssessment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.firewallPolicy_ = + firewallPolicyBuilder_ == null ? firewallPolicy_ : firewallPolicyBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FirewallPolicyAssessment) { + return mergeFrom((com.google.recaptchaenterprise.v1.FirewallPolicyAssessment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.FirewallPolicyAssessment other) { + if (other == com.google.recaptchaenterprise.v1.FirewallPolicyAssessment.getDefaultInstance()) + return this; + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasFirewallPolicy()) { + mergeFirewallPolicy(other.getFirewallPolicy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 42: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 42 + case 66: + { + input.readMessage(getFirewallPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * If the processing of a policy config fails, an error will be populated
+     * and the firewall_policy will be left empty.
+     * 
+ * + * .google.rpc.Status error = 5; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * If the processing of a policy config fails, an error will be populated
+     * and the firewall_policy will be left empty.
+     * 
+ * + * .google.rpc.Status error = 5; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If the processing of a policy config fails, an error will be populated
+     * and the firewall_policy will be left empty.
+     * 
+ * + * .google.rpc.Status error = 5; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * If the processing of a policy config fails, an error will be populated
+     * and the firewall_policy will be left empty.
+     * 
+ * + * .google.rpc.Status error = 5; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * If the processing of a policy config fails, an error will be populated
+     * and the firewall_policy will be left empty.
+     * 
+ * + * .google.rpc.Status error = 5; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * If the processing of a policy config fails, an error will be populated
+     * and the firewall_policy will be left empty.
+     * 
+ * + * .google.rpc.Status error = 5; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000001); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * If the processing of a policy config fails, an error will be populated
+     * and the firewall_policy will be left empty.
+     * 
+ * + * .google.rpc.Status error = 5; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If the processing of a policy config fails, an error will be populated
+     * and the firewall_policy will be left empty.
+     * 
+ * + * .google.rpc.Status error = 5; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * If the processing of a policy config fails, an error will be populated
+     * and the firewall_policy will be left empty.
+     * 
+ * + * .google.rpc.Status error = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.recaptchaenterprise.v1.FirewallPolicy firewallPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder> + firewallPolicyBuilder_; + /** + * + * + *
+     * 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the firewallPolicy field is set. + */ + public boolean hasFirewallPolicy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firewallPolicy. + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy() { + if (firewallPolicyBuilder_ == null) { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } else { + return firewallPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFirewallPolicy(com.google.recaptchaenterprise.v1.FirewallPolicy value) { + if (firewallPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firewallPolicy_ = value; + } else { + firewallPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFirewallPolicy( + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder builderForValue) { + if (firewallPolicyBuilder_ == null) { + firewallPolicy_ = builderForValue.build(); + } else { + firewallPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeFirewallPolicy(com.google.recaptchaenterprise.v1.FirewallPolicy value) { + if (firewallPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && firewallPolicy_ != null + && firewallPolicy_ + != com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance()) { + getFirewallPolicyBuilder().mergeFrom(value); + } else { + firewallPolicy_ = value; + } + } else { + firewallPolicyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFirewallPolicy() { + bitField0_ = (bitField0_ & ~0x00000002); + firewallPolicy_ = null; + if (firewallPolicyBuilder_ != null) { + firewallPolicyBuilder_.dispose(); + firewallPolicyBuilder_ = null; + } + onChanged(); + 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy.Builder getFirewallPolicyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFirewallPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPolicyOrBuilder() { + if (firewallPolicyBuilder_ != null) { + return firewallPolicyBuilder_.getMessageOrBuilder(); + } else { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder> + getFirewallPolicyFieldBuilder() { + if (firewallPolicyBuilder_ == null) { + firewallPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder>( + getFirewallPolicy(), getParentForChildren(), isClean()); + firewallPolicy_ = null; + } + return firewallPolicyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment) + private static final com.google.recaptchaenterprise.v1.FirewallPolicyAssessment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FirewallPolicyAssessment(); + } + + public static com.google.recaptchaenterprise.v1.FirewallPolicyAssessment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FirewallPolicyAssessment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyAssessment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyAssessmentOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyAssessmentOrBuilder.java new file mode 100644 index 000000000000..82c6862ad915 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyAssessmentOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface FirewallPolicyAssessmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If the processing of a policy config fails, an error will be populated
+   * and the firewall_policy will be left empty.
+   * 
+ * + * .google.rpc.Status error = 5; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * If the processing of a policy config fails, an error will be populated
+   * and the firewall_policy will be left empty.
+   * 
+ * + * .google.rpc.Status error = 5; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * If the processing of a policy config fails, an error will be populated
+   * and the firewall_policy will be left empty.
+   * 
+ * + * .google.rpc.Status error = 5; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the firewallPolicy field is set. + */ + boolean hasFirewallPolicy(); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firewallPolicy. + */ + com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy(); + /** + * + * + *
+   * 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.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPolicyOrBuilder(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyName.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyName.java new file mode 100644 index 000000000000..8d516e3e7f5b --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.recaptchaenterprise.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class FirewallPolicyName implements ResourceName { + private static final PathTemplate PROJECT_FIREWALLPOLICY = + PathTemplate.createWithoutUrlEncoding("projects/{project}/firewallpolicies/{firewallpolicy}"); + private volatile Map fieldValuesMap; + private final String project; + private final String firewallpolicy; + + @Deprecated + protected FirewallPolicyName() { + project = null; + firewallpolicy = null; + } + + private FirewallPolicyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + firewallpolicy = Preconditions.checkNotNull(builder.getFirewallpolicy()); + } + + public String getProject() { + return project; + } + + public String getFirewallpolicy() { + return firewallpolicy; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FirewallPolicyName of(String project, String firewallpolicy) { + return newBuilder().setProject(project).setFirewallpolicy(firewallpolicy).build(); + } + + public static String format(String project, String firewallpolicy) { + return newBuilder().setProject(project).setFirewallpolicy(firewallpolicy).build().toString(); + } + + public static FirewallPolicyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_FIREWALLPOLICY.validatedMatch( + formattedString, "FirewallPolicyName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("firewallpolicy")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (FirewallPolicyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_FIREWALLPOLICY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (firewallpolicy != null) { + fieldMapBuilder.put("firewallpolicy", firewallpolicy); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_FIREWALLPOLICY.instantiate("project", project, "firewallpolicy", firewallpolicy); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FirewallPolicyName that = ((FirewallPolicyName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.firewallpolicy, that.firewallpolicy); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(firewallpolicy); + return h; + } + + /** Builder for projects/{project}/firewallpolicies/{firewallpolicy}. */ + public static class Builder { + private String project; + private String firewallpolicy; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getFirewallpolicy() { + return firewallpolicy; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setFirewallpolicy(String firewallpolicy) { + this.firewallpolicy = firewallpolicy; + return this; + } + + private Builder(FirewallPolicyName firewallPolicyName) { + this.project = firewallPolicyName.project; + this.firewallpolicy = firewallPolicyName.firewallpolicy; + } + + public FirewallPolicyName build() { + return new FirewallPolicyName(this); + } + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyOrBuilder.java new file mode 100644 index 000000000000..d93bc495e1fa --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FirewallPolicyOrBuilder.java @@ -0,0 +1,226 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface FirewallPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FirewallPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name for the FirewallPolicy in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name for the FirewallPolicy in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A description of what this policy aims to achieve, for convenience
+   * purposes. The description can at most include 256 UTF-8 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of what this policy aims to achieve, for convenience
+   * purposes. The description can at most include 256 UTF-8 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * string path = 4; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * 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.
+   * 
+ * + * string path = 4; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * string condition = 5; + * + * @return The condition. + */ + java.lang.String 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
+   * definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).
+   * A condition has a max length of 500 characters.
+   * 
+ * + * string condition = 5; + * + * @return The bytes for condition. + */ + com.google.protobuf.ByteString getConditionBytes(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + java.util.List getActionsList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + com.google.recaptchaenterprise.v1.FirewallAction getActions(int index); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + int getActionsCount(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + java.util.List + getActionsOrBuilderList(); + /** + * + * + *
+   * 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.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6; + */ + com.google.recaptchaenterprise.v1.FirewallActionOrBuilder getActionsOrBuilder(int index); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudPreventionAssessment.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudPreventionAssessment.java index 48746c7d95ea..05542bf17e98 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudPreventionAssessment.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudPreventionAssessment.java @@ -69,8 +69,8 @@ public interface StolenInstrumentVerdictOrBuilder * * *
-     * Probability (0-1) of this transaction being executed with a stolen
-     * instrument.
+     * Probability of this transaction being executed with a stolen instrument.
+     * Values are from 0.0 (lowest) to 1.0 (highest).
      * 
* * float risk = 1; @@ -131,8 +131,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * Probability (0-1) of this transaction being executed with a stolen
-     * instrument.
+     * Probability of this transaction being executed with a stolen instrument.
+     * Values are from 0.0 (lowest) to 1.0 (highest).
      * 
* * float risk = 1; @@ -537,8 +537,8 @@ public Builder mergeFrom( * * *
-       * Probability (0-1) of this transaction being executed with a stolen
-       * instrument.
+       * Probability of this transaction being executed with a stolen instrument.
+       * Values are from 0.0 (lowest) to 1.0 (highest).
        * 
* * float risk = 1; @@ -553,8 +553,8 @@ public float getRisk() { * * *
-       * Probability (0-1) of this transaction being executed with a stolen
-       * instrument.
+       * Probability of this transaction being executed with a stolen instrument.
+       * Values are from 0.0 (lowest) to 1.0 (highest).
        * 
* * float risk = 1; @@ -573,8 +573,8 @@ public Builder setRisk(float value) { * * *
-       * Probability (0-1) of this transaction being executed with a stolen
-       * instrument.
+       * Probability of this transaction being executed with a stolen instrument.
+       * Values are from 0.0 (lowest) to 1.0 (highest).
        * 
* * float risk = 1; @@ -667,8 +667,9 @@ public interface CardTestingVerdictOrBuilder * * *
-     * Probability (0-1) of this transaction attempt being part of a card
-     * testing attack.
+     * Probability of this transaction attempt being part of a card testing
+     * attack.
+     * Values are from 0.0 (lowest) to 1.0 (highest).
      * 
* * float risk = 1; @@ -728,8 +729,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * Probability (0-1) of this transaction attempt being part of a card
-     * testing attack.
+     * Probability of this transaction attempt being part of a card testing
+     * attack.
+     * Values are from 0.0 (lowest) to 1.0 (highest).
      * 
* * float risk = 1; @@ -788,8 +790,593 @@ public boolean equals(final java.lang.Object obj) { com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict other = (com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) obj; - if (java.lang.Float.floatToIntBits(getRisk()) - != java.lang.Float.floatToIntBits(other.getRisk())) return false; + if (java.lang.Float.floatToIntBits(getRisk()) + != java.lang.Float.floatToIntBits(other.getRisk())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RISK_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getRisk()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Information about card testing fraud, where an adversary is testing
+     * fraudulently obtained cards or brute forcing their details.
+     * 
+ * + * Protobuf type {@code + * google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdictOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_CardTestingVerdict_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_CardTestingVerdict_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + .class, + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + .Builder.class); + } + + // Construct using + // com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + risk_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_CardTestingVerdict_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + build() { + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + buildPartial() { + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict result = + new com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.risk_ = risk_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) { + return mergeFrom( + (com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict other) { + if (other + == com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + .getDefaultInstance()) return this; + if (other.getRisk() != 0F) { + setRisk(other.getRisk()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + risk_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float risk_; + /** + * + * + *
+       * Probability of this transaction attempt being part of a card testing
+       * attack.
+       * Values are from 0.0 (lowest) to 1.0 (highest).
+       * 
+ * + * float risk = 1; + * + * @return The risk. + */ + @java.lang.Override + public float getRisk() { + return risk_; + } + /** + * + * + *
+       * Probability of this transaction attempt being part of a card testing
+       * attack.
+       * Values are from 0.0 (lowest) to 1.0 (highest).
+       * 
+ * + * float risk = 1; + * + * @param value The risk to set. + * @return This builder for chaining. + */ + public Builder setRisk(float value) { + + risk_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Probability of this transaction attempt being part of a card testing
+       * attack.
+       * Values are from 0.0 (lowest) to 1.0 (highest).
+       * 
+ * + * float risk = 1; + * + * @return This builder for chaining. + */ + public Builder clearRisk() { + bitField0_ = (bitField0_ & ~0x00000001); + risk_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) + private static final com.google.recaptchaenterprise.v1.FraudPreventionAssessment + .CardTestingVerdict + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict(); + } + + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CardTestingVerdict parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BehavioralTrustVerdictOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Probability of this transaction attempt being executed in a behaviorally
+     * trustworthy way.
+     * Values are from 0.0 (lowest) to 1.0 (highest).
+     * 
+ * + * float trust = 1; + * + * @return The trust. + */ + float getTrust(); + } + /** + * + * + *
+   * Information about behavioral trust of the transaction.
+   * 
+ * + * Protobuf type {@code + * google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict} + */ + public static final class BehavioralTrustVerdict extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict) + BehavioralTrustVerdictOrBuilder { + private static final long serialVersionUID = 0L; + // Use BehavioralTrustVerdict.newBuilder() to construct. + private BehavioralTrustVerdict(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BehavioralTrustVerdict() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BehavioralTrustVerdict(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .class, + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .Builder.class); + } + + public static final int TRUST_FIELD_NUMBER = 1; + private float trust_ = 0F; + /** + * + * + *
+     * Probability of this transaction attempt being executed in a behaviorally
+     * trustworthy way.
+     * Values are from 0.0 (lowest) to 1.0 (highest).
+     * 
+ * + * float trust = 1; + * + * @return The trust. + */ + @java.lang.Override + public float getTrust() { + return trust_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(trust_) != 0) { + output.writeFloat(1, trust_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(trust_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, trust_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict other = + (com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict) obj; + + if (java.lang.Float.floatToIntBits(getTrust()) + != java.lang.Float.floatToIntBits(other.getTrust())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -801,33 +1388,33 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RISK_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRisk()); + hash = (37 * hash) + TRUST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getTrust()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -835,23 +1422,23 @@ public int hashCode() { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -859,12 +1446,12 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -872,12 +1459,12 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -896,7 +1483,8 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict prototype) { + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -915,37 +1503,37 @@ protected Builder newBuilderForType( * * *
-     * Information about card testing fraud, where an adversary is testing
-     * fraudulently obtained cards or brute forcing their details.
+     * Information about behavioral trust of the transaction.
      * 
* * Protobuf type {@code - * google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict} + * google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) - com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdictOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict) + com.google.recaptchaenterprise.v1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto - .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_CardTestingVerdict_descriptor; + .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto - .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_CardTestingVerdict_fieldAccessorTable + .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict .class, - com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict .Builder.class); } // Construct using - // com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict.newBuilder() + // com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -956,27 +1544,27 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - risk_ = 0F; + trust_ = 0F; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto - .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_CardTestingVerdict_descriptor; + .internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor; } @java.lang.Override - public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict getDefaultInstanceForType() { - return com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + return com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict .getDefaultInstance(); } @java.lang.Override - public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict build() { - com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict result = + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -985,10 +1573,10 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { } @java.lang.Override - public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict buildPartial() { - com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict result = - new com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict( + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict result = + new com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict( this); if (bitField0_ != 0) { buildPartial0(result); @@ -998,10 +1586,11 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { } private void buildPartial0( - com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict result) { + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.risk_ = risk_; + result.trust_ = trust_; } } @@ -1044,9 +1633,9 @@ public Builder addRepeatedField( public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof - com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) { + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict) { return mergeFrom( - (com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) + (com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict) other); } else { super.mergeFrom(other); @@ -1055,12 +1644,13 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict other) { + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + other) { if (other - == com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + == com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict .getDefaultInstance()) return this; - if (other.getRisk() != 0F) { - setRisk(other.getRisk()); + if (other.getTrust() != 0F) { + setTrust(other.getTrust()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -1090,7 +1680,7 @@ public Builder mergeFrom( break; case 13: { - risk_ = input.readFloat(); + trust_ = input.readFloat(); bitField0_ |= 0x00000001; break; } // case 13 @@ -1113,39 +1703,41 @@ public Builder mergeFrom( private int bitField0_; - private float risk_; + private float trust_; /** * * *
-       * Probability (0-1) of this transaction attempt being part of a card
-       * testing attack.
+       * Probability of this transaction attempt being executed in a behaviorally
+       * trustworthy way.
+       * Values are from 0.0 (lowest) to 1.0 (highest).
        * 
* - * float risk = 1; + * float trust = 1; * - * @return The risk. + * @return The trust. */ @java.lang.Override - public float getRisk() { - return risk_; + public float getTrust() { + return trust_; } /** * * *
-       * Probability (0-1) of this transaction attempt being part of a card
-       * testing attack.
+       * Probability of this transaction attempt being executed in a behaviorally
+       * trustworthy way.
+       * Values are from 0.0 (lowest) to 1.0 (highest).
        * 
* - * float risk = 1; + * float trust = 1; * - * @param value The risk to set. + * @param value The trust to set. * @return This builder for chaining. */ - public Builder setRisk(float value) { + public Builder setTrust(float value) { - risk_ = value; + trust_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -1154,17 +1746,18 @@ public Builder setRisk(float value) { * * *
-       * Probability (0-1) of this transaction attempt being part of a card
-       * testing attack.
+       * Probability of this transaction attempt being executed in a behaviorally
+       * trustworthy way.
+       * Values are from 0.0 (lowest) to 1.0 (highest).
        * 
* - * float risk = 1; + * float trust = 1; * * @return This builder for chaining. */ - public Builder clearRisk() { + public Builder clearTrust() { bitField0_ = (bitField0_ & ~0x00000001); - risk_ = 0F; + trust_ = 0F; onChanged(); return this; } @@ -1181,28 +1774,28 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict) } - // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict) + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict) private static final com.google.recaptchaenterprise.v1.FraudPreventionAssessment - .CardTestingVerdict + .BehavioralTrustVerdict DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = - new com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict(); + new com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict(); } - public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public static com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public CardTestingVerdict parsePartialFrom( + public BehavioralTrustVerdict parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1222,17 +1815,17 @@ public CardTestingVerdict parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdict + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -1244,8 +1837,9 @@ public com.google.protobuf.Parser getParserForType() { * * *
-   * Probability (0-1) of this transaction being fraudulent. Summarizes the
-   * combined risk of attack vectors below.
+   * Probability of this transaction being fraudulent. Summarizes the combined
+   * risk of attack vectors below.
+   * Values are from 0.0 (lowest) to 1.0 (highest).
    * 
* * float transaction_risk = 1; @@ -1383,6 +1977,67 @@ public boolean hasCardTestingVerdict() { : cardTestingVerdict_; } + public static final int BEHAVIORAL_TRUST_VERDICT_FIELD_NUMBER = 4; + private com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + behavioralTrustVerdict_; + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return Whether the behavioralTrustVerdict field is set. + */ + @java.lang.Override + public boolean hasBehavioralTrustVerdict() { + return behavioralTrustVerdict_ != null; + } + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return The behavioralTrustVerdict. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + getBehavioralTrustVerdict() { + return behavioralTrustVerdict_ == null + ? com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .getDefaultInstance() + : behavioralTrustVerdict_; + } + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdictOrBuilder + getBehavioralTrustVerdictOrBuilder() { + return behavioralTrustVerdict_ == null + ? com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .getDefaultInstance() + : behavioralTrustVerdict_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1406,6 +2061,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cardTestingVerdict_ != null) { output.writeMessage(3, getCardTestingVerdict()); } + if (behavioralTrustVerdict_ != null) { + output.writeMessage(4, getBehavioralTrustVerdict()); + } getUnknownFields().writeTo(output); } @@ -1425,6 +2083,10 @@ public int getSerializedSize() { if (cardTestingVerdict_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCardTestingVerdict()); } + if (behavioralTrustVerdict_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBehavioralTrustVerdict()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1451,6 +2113,10 @@ public boolean equals(final java.lang.Object obj) { if (hasCardTestingVerdict()) { if (!getCardTestingVerdict().equals(other.getCardTestingVerdict())) return false; } + if (hasBehavioralTrustVerdict() != other.hasBehavioralTrustVerdict()) return false; + if (hasBehavioralTrustVerdict()) { + if (!getBehavioralTrustVerdict().equals(other.getBehavioralTrustVerdict())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1472,6 +2138,10 @@ public int hashCode() { hash = (37 * hash) + CARD_TESTING_VERDICT_FIELD_NUMBER; hash = (53 * hash) + getCardTestingVerdict().hashCode(); } + if (hasBehavioralTrustVerdict()) { + hash = (37 * hash) + BEHAVIORAL_TRUST_VERDICT_FIELD_NUMBER; + hash = (53 * hash) + getBehavioralTrustVerdict().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1623,6 +2293,11 @@ public Builder clear() { cardTestingVerdictBuilder_.dispose(); cardTestingVerdictBuilder_ = null; } + behavioralTrustVerdict_ = null; + if (behavioralTrustVerdictBuilder_ != null) { + behavioralTrustVerdictBuilder_.dispose(); + behavioralTrustVerdictBuilder_ = null; + } return this; } @@ -1674,6 +2349,12 @@ private void buildPartial0(com.google.recaptchaenterprise.v1.FraudPreventionAsse ? cardTestingVerdict_ : cardTestingVerdictBuilder_.build(); } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.behavioralTrustVerdict_ = + behavioralTrustVerdictBuilder_ == null + ? behavioralTrustVerdict_ + : behavioralTrustVerdictBuilder_.build(); + } } @java.lang.Override @@ -1731,6 +2412,9 @@ public Builder mergeFrom(com.google.recaptchaenterprise.v1.FraudPreventionAssess if (other.hasCardTestingVerdict()) { mergeCardTestingVerdict(other.getCardTestingVerdict()); } + if (other.hasBehavioralTrustVerdict()) { + mergeBehavioralTrustVerdict(other.getBehavioralTrustVerdict()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1777,6 +2461,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + input.readMessage( + getBehavioralTrustVerdictFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1801,8 +2492,9 @@ public Builder mergeFrom( * * *
-     * Probability (0-1) of this transaction being fraudulent. Summarizes the
-     * combined risk of attack vectors below.
+     * Probability of this transaction being fraudulent. Summarizes the combined
+     * risk of attack vectors below.
+     * Values are from 0.0 (lowest) to 1.0 (highest).
      * 
* * float transaction_risk = 1; @@ -1817,8 +2509,9 @@ public float getTransactionRisk() { * * *
-     * Probability (0-1) of this transaction being fraudulent. Summarizes the
-     * combined risk of attack vectors below.
+     * Probability of this transaction being fraudulent. Summarizes the combined
+     * risk of attack vectors below.
+     * Values are from 0.0 (lowest) to 1.0 (highest).
      * 
* * float transaction_risk = 1; @@ -1837,8 +2530,9 @@ public Builder setTransactionRisk(float value) { * * *
-     * Probability (0-1) of this transaction being fraudulent. Summarizes the
-     * combined risk of attack vectors below.
+     * Probability of this transaction being fraudulent. Summarizes the combined
+     * risk of attack vectors below.
+     * Values are from 0.0 (lowest) to 1.0 (highest).
      * 
* * float transaction_risk = 1; @@ -2297,6 +2991,227 @@ public Builder clearCardTestingVerdict() { return cardTestingVerdictBuilder_; } + private com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + behavioralTrustVerdict_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict, + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .Builder, + com.google.recaptchaenterprise.v1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder> + behavioralTrustVerdictBuilder_; + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return Whether the behavioralTrustVerdict field is set. + */ + public boolean hasBehavioralTrustVerdict() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return The behavioralTrustVerdict. + */ + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + getBehavioralTrustVerdict() { + if (behavioralTrustVerdictBuilder_ == null) { + return behavioralTrustVerdict_ == null + ? com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .getDefaultInstance() + : behavioralTrustVerdict_; + } else { + return behavioralTrustVerdictBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public Builder setBehavioralTrustVerdict( + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict value) { + if (behavioralTrustVerdictBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + behavioralTrustVerdict_ = value; + } else { + behavioralTrustVerdictBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public Builder setBehavioralTrustVerdict( + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict.Builder + builderForValue) { + if (behavioralTrustVerdictBuilder_ == null) { + behavioralTrustVerdict_ = builderForValue.build(); + } else { + behavioralTrustVerdictBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public Builder mergeBehavioralTrustVerdict( + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict value) { + if (behavioralTrustVerdictBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && behavioralTrustVerdict_ != null + && behavioralTrustVerdict_ + != com.google.recaptchaenterprise.v1.FraudPreventionAssessment + .BehavioralTrustVerdict.getDefaultInstance()) { + getBehavioralTrustVerdictBuilder().mergeFrom(value); + } else { + behavioralTrustVerdict_ = value; + } + } else { + behavioralTrustVerdictBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public Builder clearBehavioralTrustVerdict() { + bitField0_ = (bitField0_ & ~0x00000008); + behavioralTrustVerdict_ = null; + if (behavioralTrustVerdictBuilder_ != null) { + behavioralTrustVerdictBuilder_.dispose(); + behavioralTrustVerdictBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .Builder + getBehavioralTrustVerdictBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBehavioralTrustVerdictFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public com.google.recaptchaenterprise.v1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder + getBehavioralTrustVerdictOrBuilder() { + if (behavioralTrustVerdictBuilder_ != null) { + return behavioralTrustVerdictBuilder_.getMessageOrBuilder(); + } else { + return behavioralTrustVerdict_ == null + ? com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .getDefaultInstance() + : behavioralTrustVerdict_; + } + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict, + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .Builder, + com.google.recaptchaenterprise.v1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder> + getBehavioralTrustVerdictFieldBuilder() { + if (behavioralTrustVerdictBuilder_ == null) { + behavioralTrustVerdictBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict, + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + .Builder, + com.google.recaptchaenterprise.v1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder>( + getBehavioralTrustVerdict(), getParentForChildren(), isClean()); + behavioralTrustVerdict_ = null; + } + return behavioralTrustVerdictBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudPreventionAssessmentOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudPreventionAssessmentOrBuilder.java index 728082e324b3..4a04b8e8488e 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudPreventionAssessmentOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudPreventionAssessmentOrBuilder.java @@ -27,8 +27,9 @@ public interface FraudPreventionAssessmentOrBuilder * * *
-   * Probability (0-1) of this transaction being fraudulent. Summarizes the
-   * combined risk of attack vectors below.
+   * Probability of this transaction being fraudulent. Summarizes the combined
+   * risk of attack vectors below.
+   * Values are from 0.0 (lowest) to 1.0 (highest).
    * 
* * float transaction_risk = 1; @@ -125,4 +126,47 @@ public interface FraudPreventionAssessmentOrBuilder */ com.google.recaptchaenterprise.v1.FraudPreventionAssessment.CardTestingVerdictOrBuilder getCardTestingVerdictOrBuilder(); + + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return Whether the behavioralTrustVerdict field is set. + */ + boolean hasBehavioralTrustVerdict(); + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return The behavioralTrustVerdict. + */ + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict + getBehavioralTrustVerdict(); + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + com.google.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdictOrBuilder + getBehavioralTrustVerdictOrBuilder(); } diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudSignals.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudSignals.java new file mode 100644 index 000000000000..ab1b973c9716 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudSignals.java @@ -0,0 +1,2850 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * Fraud signals describing users and cards involved in the transaction.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FraudSignals} + */ +public final class FraudSignals extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FraudSignals) + FraudSignalsOrBuilder { + private static final long serialVersionUID = 0L; + // Use FraudSignals.newBuilder() to construct. + private FraudSignals(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FraudSignals() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FraudSignals(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FraudSignals.class, + com.google.recaptchaenterprise.v1.FraudSignals.Builder.class); + } + + public interface UserSignalsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. This user (based on email, phone, and other identifiers) has
+     * been seen on the internet for at least this number of days.
+     * 
+ * + * int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The activeDaysLowerBound. + */ + int getActiveDaysLowerBound(); + + /** + * + * + *
+     * 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.
+     * 
+ * + * float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The syntheticRisk. + */ + float getSyntheticRisk(); + } + /** + * + * + *
+   * Signals describing the user involved in this transaction.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals} + */ + public static final class UserSignals extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals) + UserSignalsOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserSignals.newBuilder() to construct. + private UserSignals(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserSignals() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserSignals(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.class, + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.Builder.class); + } + + public static final int ACTIVE_DAYS_LOWER_BOUND_FIELD_NUMBER = 1; + private int activeDaysLowerBound_ = 0; + /** + * + * + *
+     * Output only. This user (based on email, phone, and other identifiers) has
+     * been seen on the internet for at least this number of days.
+     * 
+ * + * int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The activeDaysLowerBound. + */ + @java.lang.Override + public int getActiveDaysLowerBound() { + return activeDaysLowerBound_; + } + + public static final int SYNTHETIC_RISK_FIELD_NUMBER = 2; + private float syntheticRisk_ = 0F; + /** + * + * + *
+     * 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.
+     * 
+ * + * float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The syntheticRisk. + */ + @java.lang.Override + public float getSyntheticRisk() { + return syntheticRisk_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (activeDaysLowerBound_ != 0) { + output.writeInt32(1, activeDaysLowerBound_); + } + if (java.lang.Float.floatToRawIntBits(syntheticRisk_) != 0) { + output.writeFloat(2, syntheticRisk_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (activeDaysLowerBound_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, activeDaysLowerBound_); + } + if (java.lang.Float.floatToRawIntBits(syntheticRisk_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, syntheticRisk_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FraudSignals.UserSignals)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals other = + (com.google.recaptchaenterprise.v1.FraudSignals.UserSignals) obj; + + if (getActiveDaysLowerBound() != other.getActiveDaysLowerBound()) return false; + if (java.lang.Float.floatToIntBits(getSyntheticRisk()) + != java.lang.Float.floatToIntBits(other.getSyntheticRisk())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTIVE_DAYS_LOWER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + getActiveDaysLowerBound(); + hash = (37 * hash) + SYNTHETIC_RISK_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSyntheticRisk()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Signals describing the user involved in this transaction.
+     * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals) + com.google.recaptchaenterprise.v1.FraudSignals.UserSignalsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.class, + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + activeDaysLowerBound_ = 0; + syntheticRisk_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.UserSignals + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.UserSignals build() { + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.UserSignals buildPartial() { + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals result = + new com.google.recaptchaenterprise.v1.FraudSignals.UserSignals(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.activeDaysLowerBound_ = activeDaysLowerBound_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.syntheticRisk_ = syntheticRisk_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FraudSignals.UserSignals) { + return mergeFrom((com.google.recaptchaenterprise.v1.FraudSignals.UserSignals) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.FraudSignals.UserSignals other) { + if (other + == com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.getDefaultInstance()) + return this; + if (other.getActiveDaysLowerBound() != 0) { + setActiveDaysLowerBound(other.getActiveDaysLowerBound()); + } + if (other.getSyntheticRisk() != 0F) { + setSyntheticRisk(other.getSyntheticRisk()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + activeDaysLowerBound_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: + { + syntheticRisk_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int activeDaysLowerBound_; + /** + * + * + *
+       * Output only. This user (based on email, phone, and other identifiers) has
+       * been seen on the internet for at least this number of days.
+       * 
+ * + * int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The activeDaysLowerBound. + */ + @java.lang.Override + public int getActiveDaysLowerBound() { + return activeDaysLowerBound_; + } + /** + * + * + *
+       * Output only. This user (based on email, phone, and other identifiers) has
+       * been seen on the internet for at least this number of days.
+       * 
+ * + * int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The activeDaysLowerBound to set. + * @return This builder for chaining. + */ + public Builder setActiveDaysLowerBound(int value) { + + activeDaysLowerBound_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. This user (based on email, phone, and other identifiers) has
+       * been seen on the internet for at least this number of days.
+       * 
+ * + * int32 active_days_lower_bound = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearActiveDaysLowerBound() { + bitField0_ = (bitField0_ & ~0x00000001); + activeDaysLowerBound_ = 0; + onChanged(); + return this; + } + + private float syntheticRisk_; + /** + * + * + *
+       * 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.
+       * 
+ * + * float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The syntheticRisk. + */ + @java.lang.Override + public float getSyntheticRisk() { + return syntheticRisk_; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The syntheticRisk to set. + * @return This builder for chaining. + */ + public Builder setSyntheticRisk(float value) { + + syntheticRisk_ = value; + bitField0_ |= 0x00000002; + onChanged(); + 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.
+       * 
+ * + * float synthetic_risk = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSyntheticRisk() { + bitField0_ = (bitField0_ & ~0x00000002); + syntheticRisk_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals) + private static final com.google.recaptchaenterprise.v1.FraudSignals.UserSignals + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FraudSignals.UserSignals(); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.UserSignals getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserSignals parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.UserSignals getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CardSignalsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the cardLabels. + */ + java.util.List + getCardLabelsList(); + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of cardLabels. + */ + int getCardLabelsCount(); + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The cardLabels at the given index. + */ + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel getCardLabels(int index); + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for cardLabels. + */ + java.util.List getCardLabelsValueList(); + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of cardLabels at the given index. + */ + int getCardLabelsValue(int index); + } + /** + * + * + *
+   * Signals describing the payment card used in this transaction.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals} + */ + public static final class CardSignals extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals) + CardSignalsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CardSignals.newBuilder() to construct. + private CardSignals(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CardSignals() { + cardLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CardSignals(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.class, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.Builder.class); + } + + /** + * + * + *
+     * Risk labels describing the card being assessed, such as its funding
+     * mechanism.
+     * 
+ * + * Protobuf enum {@code google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel} + */ + public enum CardLabel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * No label specified.
+       * 
+ * + * CARD_LABEL_UNSPECIFIED = 0; + */ + CARD_LABEL_UNSPECIFIED(0), + /** + * + * + *
+       * This card has been detected as prepaid.
+       * 
+ * + * PREPAID = 1; + */ + PREPAID(1), + /** + * + * + *
+       * This card has been detected as virtual, such as a card number generated
+       * for a single transaction or merchant.
+       * 
+ * + * VIRTUAL = 2; + */ + VIRTUAL(2), + /** + * + * + *
+       * This card has been detected as being used in an unexpected geographic
+       * location.
+       * 
+ * + * UNEXPECTED_LOCATION = 3; + */ + UNEXPECTED_LOCATION(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * No label specified.
+       * 
+ * + * CARD_LABEL_UNSPECIFIED = 0; + */ + public static final int CARD_LABEL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * This card has been detected as prepaid.
+       * 
+ * + * PREPAID = 1; + */ + public static final int PREPAID_VALUE = 1; + /** + * + * + *
+       * This card has been detected as virtual, such as a card number generated
+       * for a single transaction or merchant.
+       * 
+ * + * VIRTUAL = 2; + */ + public static final int VIRTUAL_VALUE = 2; + /** + * + * + *
+       * This card has been detected as being used in an unexpected geographic
+       * location.
+       * 
+ * + * UNEXPECTED_LOCATION = 3; + */ + public static final int UNEXPECTED_LOCATION_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CardLabel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CardLabel forNumber(int value) { + switch (value) { + case 0: + return CARD_LABEL_UNSPECIFIED; + case 1: + return PREPAID; + case 2: + return VIRTUAL; + case 3: + return UNEXPECTED_LOCATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CardLabel findValueByNumber(int number) { + return CardLabel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final CardLabel[] VALUES = values(); + + public static CardLabel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CardLabel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel) + } + + public static final int CARD_LABELS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List cardLabels_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel> + cardLabels_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel>() { + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel convert( + java.lang.Integer from) { + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel result = + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel.forNumber( + from); + return result == null + ? com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel + .UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the cardLabels. + */ + @java.lang.Override + public java.util.List + getCardLabelsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel>( + cardLabels_, cardLabels_converter_); + } + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of cardLabels. + */ + @java.lang.Override + public int getCardLabelsCount() { + return cardLabels_.size(); + } + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The cardLabels at the given index. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel getCardLabels( + int index) { + return cardLabels_converter_.convert(cardLabels_.get(index)); + } + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for cardLabels. + */ + @java.lang.Override + public java.util.List getCardLabelsValueList() { + return cardLabels_; + } + /** + * + * + *
+     * Output only. The labels for the payment card in this transaction.
+     * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of cardLabels at the given index. + */ + @java.lang.Override + public int getCardLabelsValue(int index) { + return cardLabels_.get(index); + } + + private int cardLabelsMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getCardLabelsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(cardLabelsMemoizedSerializedSize); + } + for (int i = 0; i < cardLabels_.size(); i++) { + output.writeEnumNoTag(cardLabels_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < cardLabels_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(cardLabels_.get(i)); + } + size += dataSize; + if (!getCardLabelsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + cardLabelsMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FraudSignals.CardSignals)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals other = + (com.google.recaptchaenterprise.v1.FraudSignals.CardSignals) obj; + + if (!cardLabels_.equals(other.cardLabels_)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCardLabelsCount() > 0) { + hash = (37 * hash) + CARD_LABELS_FIELD_NUMBER; + hash = (53 * hash) + cardLabels_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Signals describing the payment card used in this transaction.
+     * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals) + com.google.recaptchaenterprise.v1.FraudSignals.CardSignalsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.class, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cardLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals build() { + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals buildPartial() { + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals result = + new com.google.recaptchaenterprise.v1.FraudSignals.CardSignals(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals result) { + if (((bitField0_ & 0x00000001) != 0)) { + cardLabels_ = java.util.Collections.unmodifiableList(cardLabels_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cardLabels_ = cardLabels_; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FraudSignals.CardSignals) { + return mergeFrom((com.google.recaptchaenterprise.v1.FraudSignals.CardSignals) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.FraudSignals.CardSignals other) { + if (other + == com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.getDefaultInstance()) + return this; + if (!other.cardLabels_.isEmpty()) { + if (cardLabels_.isEmpty()) { + cardLabels_ = other.cardLabels_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCardLabelsIsMutable(); + cardLabels_.addAll(other.cardLabels_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int tmpRaw = input.readEnum(); + ensureCardLabelsIsMutable(); + cardLabels_.add(tmpRaw); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureCardLabelsIsMutable(); + cardLabels_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List cardLabels_ = java.util.Collections.emptyList(); + + private void ensureCardLabelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cardLabels_ = new java.util.ArrayList(cardLabels_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the cardLabels. + */ + public java.util.List + getCardLabelsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel>( + cardLabels_, cardLabels_converter_); + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of cardLabels. + */ + public int getCardLabelsCount() { + return cardLabels_.size(); + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The cardLabels at the given index. + */ + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel getCardLabels( + int index) { + return cardLabels_converter_.convert(cardLabels_.get(index)); + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The cardLabels to set. + * @return This builder for chaining. + */ + public Builder setCardLabels( + int index, com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCardLabelsIsMutable(); + cardLabels_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The cardLabels to add. + * @return This builder for chaining. + */ + public Builder addCardLabels( + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCardLabelsIsMutable(); + cardLabels_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The cardLabels to add. + * @return This builder for chaining. + */ + public Builder addAllCardLabels( + java.lang.Iterable< + ? extends com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel> + values) { + ensureCardLabelsIsMutable(); + for (com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel value : values) { + cardLabels_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearCardLabels() { + cardLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for cardLabels. + */ + public java.util.List getCardLabelsValueList() { + return java.util.Collections.unmodifiableList(cardLabels_); + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of cardLabels at the given index. + */ + public int getCardLabelsValue(int index) { + return cardLabels_.get(index); + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for cardLabels to set. + * @return This builder for chaining. + */ + public Builder setCardLabelsValue(int index, int value) { + ensureCardLabelsIsMutable(); + cardLabels_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for cardLabels to add. + * @return This builder for chaining. + */ + public Builder addCardLabelsValue(int value) { + ensureCardLabelsIsMutable(); + cardLabels_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The labels for the payment card in this transaction.
+       * 
+ * + * + * repeated .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals.CardLabel card_labels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enum numeric values on the wire for cardLabels to add. + * @return This builder for chaining. + */ + public Builder addAllCardLabelsValue(java.lang.Iterable values) { + ensureCardLabelsIsMutable(); + for (int value : values) { + cardLabels_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals) + private static final com.google.recaptchaenterprise.v1.FraudSignals.CardSignals + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FraudSignals.CardSignals(); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals.CardSignals getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CardSignals parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int USER_SIGNALS_FIELD_NUMBER = 1; + private com.google.recaptchaenterprise.v1.FraudSignals.UserSignals userSignals_; + /** + * + * + *
+   * Output only. Signals describing the end user in this transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userSignals field is set. + */ + @java.lang.Override + public boolean hasUserSignals() { + return userSignals_ != null; + } + /** + * + * + *
+   * Output only. Signals describing the end user in this transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userSignals. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.UserSignals getUserSignals() { + return userSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.getDefaultInstance() + : userSignals_; + } + /** + * + * + *
+   * Output only. Signals describing the end user in this transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.UserSignalsOrBuilder + getUserSignalsOrBuilder() { + return userSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.getDefaultInstance() + : userSignals_; + } + + public static final int CARD_SIGNALS_FIELD_NUMBER = 2; + private com.google.recaptchaenterprise.v1.FraudSignals.CardSignals cardSignals_; + /** + * + * + *
+   * Output only. Signals describing the payment card or cards used in this
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cardSignals field is set. + */ + @java.lang.Override + public boolean hasCardSignals() { + return cardSignals_ != null; + } + /** + * + * + *
+   * Output only. Signals describing the payment card or cards used in this
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cardSignals. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals getCardSignals() { + return cardSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.getDefaultInstance() + : cardSignals_; + } + /** + * + * + *
+   * Output only. Signals describing the payment card or cards used in this
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignalsOrBuilder + getCardSignalsOrBuilder() { + return cardSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.getDefaultInstance() + : cardSignals_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (userSignals_ != null) { + output.writeMessage(1, getUserSignals()); + } + if (cardSignals_ != null) { + output.writeMessage(2, getCardSignals()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userSignals_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUserSignals()); + } + if (cardSignals_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCardSignals()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.FraudSignals)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.FraudSignals other = + (com.google.recaptchaenterprise.v1.FraudSignals) obj; + + if (hasUserSignals() != other.hasUserSignals()) return false; + if (hasUserSignals()) { + if (!getUserSignals().equals(other.getUserSignals())) return false; + } + if (hasCardSignals() != other.hasCardSignals()) return false; + if (hasCardSignals()) { + if (!getCardSignals().equals(other.getCardSignals())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserSignals()) { + hash = (37 * hash) + USER_SIGNALS_FIELD_NUMBER; + hash = (53 * hash) + getUserSignals().hashCode(); + } + if (hasCardSignals()) { + hash = (37 * hash) + CARD_SIGNALS_FIELD_NUMBER; + hash = (53 * hash) + getCardSignals().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.recaptchaenterprise.v1.FraudSignals prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Fraud signals describing users and cards involved in the transaction.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.FraudSignals} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.FraudSignals) + com.google.recaptchaenterprise.v1.FraudSignalsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.FraudSignals.class, + com.google.recaptchaenterprise.v1.FraudSignals.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.FraudSignals.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userSignals_ = null; + if (userSignalsBuilder_ != null) { + userSignalsBuilder_.dispose(); + userSignalsBuilder_ = null; + } + cardSignals_ = null; + if (cardSignalsBuilder_ != null) { + cardSignalsBuilder_.dispose(); + cardSignalsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.FraudSignals.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals build() { + com.google.recaptchaenterprise.v1.FraudSignals result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals buildPartial() { + com.google.recaptchaenterprise.v1.FraudSignals result = + new com.google.recaptchaenterprise.v1.FraudSignals(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.recaptchaenterprise.v1.FraudSignals result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userSignals_ = + userSignalsBuilder_ == null ? userSignals_ : userSignalsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cardSignals_ = + cardSignalsBuilder_ == null ? cardSignals_ : cardSignalsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.FraudSignals) { + return mergeFrom((com.google.recaptchaenterprise.v1.FraudSignals) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.FraudSignals other) { + if (other == com.google.recaptchaenterprise.v1.FraudSignals.getDefaultInstance()) return this; + if (other.hasUserSignals()) { + mergeUserSignals(other.getUserSignals()); + } + if (other.hasCardSignals()) { + mergeCardSignals(other.getCardSignals()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUserSignalsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCardSignalsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.recaptchaenterprise.v1.FraudSignals.UserSignals userSignals_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals, + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.Builder, + com.google.recaptchaenterprise.v1.FraudSignals.UserSignalsOrBuilder> + userSignalsBuilder_; + /** + * + * + *
+     * Output only. Signals describing the end user in this transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userSignals field is set. + */ + public boolean hasUserSignals() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Output only. Signals describing the end user in this transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userSignals. + */ + public com.google.recaptchaenterprise.v1.FraudSignals.UserSignals getUserSignals() { + if (userSignalsBuilder_ == null) { + return userSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.getDefaultInstance() + : userSignals_; + } else { + return userSignalsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Signals describing the end user in this transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserSignals( + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals value) { + if (userSignalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userSignals_ = value; + } else { + userSignalsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Signals describing the end user in this transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserSignals( + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.Builder builderForValue) { + if (userSignalsBuilder_ == null) { + userSignals_ = builderForValue.build(); + } else { + userSignalsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Signals describing the end user in this transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUserSignals( + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals value) { + if (userSignalsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && userSignals_ != null + && userSignals_ + != com.google.recaptchaenterprise.v1.FraudSignals.UserSignals + .getDefaultInstance()) { + getUserSignalsBuilder().mergeFrom(value); + } else { + userSignals_ = value; + } + } else { + userSignalsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Signals describing the end user in this transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUserSignals() { + bitField0_ = (bitField0_ & ~0x00000001); + userSignals_ = null; + if (userSignalsBuilder_ != null) { + userSignalsBuilder_.dispose(); + userSignalsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Signals describing the end user in this transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.Builder + getUserSignalsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserSignalsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Signals describing the end user in this transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.recaptchaenterprise.v1.FraudSignals.UserSignalsOrBuilder + getUserSignalsOrBuilder() { + if (userSignalsBuilder_ != null) { + return userSignalsBuilder_.getMessageOrBuilder(); + } else { + return userSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.getDefaultInstance() + : userSignals_; + } + } + /** + * + * + *
+     * Output only. Signals describing the end user in this transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals, + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.Builder, + com.google.recaptchaenterprise.v1.FraudSignals.UserSignalsOrBuilder> + getUserSignalsFieldBuilder() { + if (userSignalsBuilder_ == null) { + userSignalsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals, + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals.Builder, + com.google.recaptchaenterprise.v1.FraudSignals.UserSignalsOrBuilder>( + getUserSignals(), getParentForChildren(), isClean()); + userSignals_ = null; + } + return userSignalsBuilder_; + } + + private com.google.recaptchaenterprise.v1.FraudSignals.CardSignals cardSignals_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.Builder, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignalsOrBuilder> + cardSignalsBuilder_; + /** + * + * + *
+     * Output only. Signals describing the payment card or cards used in this
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cardSignals field is set. + */ + public boolean hasCardSignals() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Signals describing the payment card or cards used in this
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cardSignals. + */ + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals getCardSignals() { + if (cardSignalsBuilder_ == null) { + return cardSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.getDefaultInstance() + : cardSignals_; + } else { + return cardSignalsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Signals describing the payment card or cards used in this
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCardSignals( + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals value) { + if (cardSignalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cardSignals_ = value; + } else { + cardSignalsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Signals describing the payment card or cards used in this
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCardSignals( + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.Builder builderForValue) { + if (cardSignalsBuilder_ == null) { + cardSignals_ = builderForValue.build(); + } else { + cardSignalsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Signals describing the payment card or cards used in this
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCardSignals( + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals value) { + if (cardSignalsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && cardSignals_ != null + && cardSignals_ + != com.google.recaptchaenterprise.v1.FraudSignals.CardSignals + .getDefaultInstance()) { + getCardSignalsBuilder().mergeFrom(value); + } else { + cardSignals_ = value; + } + } else { + cardSignalsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Signals describing the payment card or cards used in this
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCardSignals() { + bitField0_ = (bitField0_ & ~0x00000002); + cardSignals_ = null; + if (cardSignalsBuilder_ != null) { + cardSignalsBuilder_.dispose(); + cardSignalsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Signals describing the payment card or cards used in this
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.Builder + getCardSignalsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCardSignalsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Signals describing the payment card or cards used in this
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.recaptchaenterprise.v1.FraudSignals.CardSignalsOrBuilder + getCardSignalsOrBuilder() { + if (cardSignalsBuilder_ != null) { + return cardSignalsBuilder_.getMessageOrBuilder(); + } else { + return cardSignals_ == null + ? com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.getDefaultInstance() + : cardSignals_; + } + } + /** + * + * + *
+     * Output only. Signals describing the payment card or cards used in this
+     * transaction.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.Builder, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignalsOrBuilder> + getCardSignalsFieldBuilder() { + if (cardSignalsBuilder_ == null) { + cardSignalsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals.Builder, + com.google.recaptchaenterprise.v1.FraudSignals.CardSignalsOrBuilder>( + getCardSignals(), getParentForChildren(), isClean()); + cardSignals_ = null; + } + return cardSignalsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.FraudSignals) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.FraudSignals) + private static final com.google.recaptchaenterprise.v1.FraudSignals DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.FraudSignals(); + } + + public static com.google.recaptchaenterprise.v1.FraudSignals getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FraudSignals parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.FraudSignals getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudSignalsOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudSignalsOrBuilder.java new file mode 100644 index 000000000000..fb777ccf4860 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/FraudSignalsOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface FraudSignalsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.FraudSignals) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Signals describing the end user in this transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userSignals field is set. + */ + boolean hasUserSignals(); + /** + * + * + *
+   * Output only. Signals describing the end user in this transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userSignals. + */ + com.google.recaptchaenterprise.v1.FraudSignals.UserSignals getUserSignals(); + /** + * + * + *
+   * Output only. Signals describing the end user in this transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.UserSignals user_signals = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.recaptchaenterprise.v1.FraudSignals.UserSignalsOrBuilder getUserSignalsOrBuilder(); + + /** + * + * + *
+   * Output only. Signals describing the payment card or cards used in this
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cardSignals field is set. + */ + boolean hasCardSignals(); + /** + * + * + *
+   * Output only. Signals describing the payment card or cards used in this
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cardSignals. + */ + com.google.recaptchaenterprise.v1.FraudSignals.CardSignals getCardSignals(); + /** + * + * + *
+   * Output only. Signals describing the payment card or cards used in this
+   * transaction.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FraudSignals.CardSignals card_signals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.recaptchaenterprise.v1.FraudSignals.CardSignalsOrBuilder getCardSignalsOrBuilder(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetFirewallPolicyRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetFirewallPolicyRequest.java new file mode 100644 index 000000000000..107f01d78f9d --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetFirewallPolicyRequest.java @@ -0,0 +1,646 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * The get firewall policy request message.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest} + */ +public final class GetFirewallPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest) + GetFirewallPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFirewallPolicyRequest.newBuilder() to construct. + private GetFirewallPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetFirewallPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetFirewallPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest.class, + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the requested policy, in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the requested policy, in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest other = + (com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The get firewall policy request message.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest) + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest.class, + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest build() { + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest buildPartial() { + com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest result = + new com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest) { + return mergeFrom((com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest other) { + if (other == com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the requested policy, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the requested policy, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the requested policy, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the requested policy, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the requested policy, in the format
+     * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest) + private static final com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest(); + } + + public static com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFirewallPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetFirewallPolicyRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetFirewallPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..850c60015527 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetFirewallPolicyRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface GetFirewallPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the requested policy, in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the requested policy, in the format
+   * `projects/{project}/firewallpolicies/{firewallpolicy}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetKeyRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetKeyRequest.java index 6313ee7c9d7d..6a4b34a22ec2 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetKeyRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetKeyRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the requested key, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * Required. The name of the requested key, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * @@ -467,7 +467,7 @@ public Builder mergeFrom( * *
      * Required. The name of the requested key, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -492,7 +492,7 @@ public java.lang.String getName() { * *
      * Required. The name of the requested key, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -517,7 +517,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The name of the requested key, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -541,7 +541,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The name of the requested key, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -561,7 +561,7 @@ public Builder clearName() { * *
      * Required. The name of the requested key, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetKeyRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetKeyRequestOrBuilder.java index 8d48857f4295..28af9b61117b 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetKeyRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetKeyRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetKeyRequestOrBuilder * *
    * Required. The name of the requested key, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * @@ -43,7 +43,7 @@ public interface GetKeyRequestOrBuilder * *
    * Required. The name of the requested key, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetMetricsRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetMetricsRequest.java index 9e8f841b653c..aeab65a6f1c5 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetMetricsRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetMetricsRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the requested metrics, in the format
-   * "projects/{project}/keys/{key}/metrics".
+   * `projects/{project}/keys/{key}/metrics`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * Required. The name of the requested metrics, in the format
-   * "projects/{project}/keys/{key}/metrics".
+   * `projects/{project}/keys/{key}/metrics`.
    * 
* * @@ -467,7 +467,7 @@ public Builder mergeFrom( * *
      * Required. The name of the requested metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * @@ -492,7 +492,7 @@ public java.lang.String getName() { * *
      * Required. The name of the requested metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * @@ -517,7 +517,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The name of the requested metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * @@ -541,7 +541,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The name of the requested metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * @@ -561,7 +561,7 @@ public Builder clearName() { * *
      * Required. The name of the requested metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetMetricsRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetMetricsRequestOrBuilder.java index ed1fe756e15d..3cf46ec3e90a 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetMetricsRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/GetMetricsRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetMetricsRequestOrBuilder * *
    * Required. The name of the requested metrics, in the format
-   * "projects/{project}/keys/{key}/metrics".
+   * `projects/{project}/keys/{key}/metrics`.
    * 
* * @@ -43,7 +43,7 @@ public interface GetMetricsRequestOrBuilder * *
    * Required. The name of the requested metrics, in the format
-   * "projects/{project}/keys/{key}/metrics".
+   * `projects/{project}/keys/{key}/metrics`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/IOSKeySettings.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/IOSKeySettings.java index e3d81204537f..449de49a1b5f 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/IOSKeySettings.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/IOSKeySettings.java @@ -148,6 +148,69 @@ public com.google.protobuf.ByteString getAllowedBundleIdsBytes(int index) { return allowedBundleIds_.getByteString(index); } + public static final int APPLE_DEVELOPER_ID_FIELD_NUMBER = 3; + private com.google.recaptchaenterprise.v1.AppleDeveloperId appleDeveloperId_; + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + * + * @return Whether the appleDeveloperId field is set. + */ + @java.lang.Override + public boolean hasAppleDeveloperId() { + return appleDeveloperId_ != null; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + * + * @return The appleDeveloperId. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.AppleDeveloperId getAppleDeveloperId() { + return appleDeveloperId_ == null + ? com.google.recaptchaenterprise.v1.AppleDeveloperId.getDefaultInstance() + : appleDeveloperId_; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.AppleDeveloperIdOrBuilder + getAppleDeveloperIdOrBuilder() { + return appleDeveloperId_ == null + ? com.google.recaptchaenterprise.v1.AppleDeveloperId.getDefaultInstance() + : appleDeveloperId_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -168,6 +231,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowAllBundleIds_ != false) { output.writeBool(2, allowAllBundleIds_); } + if (appleDeveloperId_ != null) { + output.writeMessage(3, getAppleDeveloperId()); + } getUnknownFields().writeTo(output); } @@ -188,6 +254,9 @@ public int getSerializedSize() { if (allowAllBundleIds_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowAllBundleIds_); } + if (appleDeveloperId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAppleDeveloperId()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -206,6 +275,10 @@ public boolean equals(final java.lang.Object obj) { if (getAllowAllBundleIds() != other.getAllowAllBundleIds()) return false; if (!getAllowedBundleIdsList().equals(other.getAllowedBundleIdsList())) return false; + if (hasAppleDeveloperId() != other.hasAppleDeveloperId()) return false; + if (hasAppleDeveloperId()) { + if (!getAppleDeveloperId().equals(other.getAppleDeveloperId())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,6 +296,10 @@ public int hashCode() { hash = (37 * hash) + ALLOWED_BUNDLE_IDS_FIELD_NUMBER; hash = (53 * hash) + getAllowedBundleIdsList().hashCode(); } + if (hasAppleDeveloperId()) { + hash = (37 * hash) + APPLE_DEVELOPER_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppleDeveloperId().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -364,6 +441,11 @@ public Builder clear() { bitField0_ = 0; allowAllBundleIds_ = false; allowedBundleIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + appleDeveloperId_ = null; + if (appleDeveloperIdBuilder_ != null) { + appleDeveloperIdBuilder_.dispose(); + appleDeveloperIdBuilder_ = null; + } return this; } @@ -407,6 +489,10 @@ private void buildPartial0(com.google.recaptchaenterprise.v1.IOSKeySettings resu allowedBundleIds_.makeImmutable(); result.allowedBundleIds_ = allowedBundleIds_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.appleDeveloperId_ = + appleDeveloperIdBuilder_ == null ? appleDeveloperId_ : appleDeveloperIdBuilder_.build(); + } } @java.lang.Override @@ -468,6 +554,9 @@ public Builder mergeFrom(com.google.recaptchaenterprise.v1.IOSKeySettings other) } onChanged(); } + if (other.hasAppleDeveloperId()) { + mergeAppleDeveloperId(other.getAppleDeveloperId()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -507,6 +596,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 16 + case 26: + { + input.readMessage( + getAppleDeveloperIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -762,6 +858,228 @@ public Builder addAllowedBundleIdsBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.recaptchaenterprise.v1.AppleDeveloperId appleDeveloperId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.AppleDeveloperId, + com.google.recaptchaenterprise.v1.AppleDeveloperId.Builder, + com.google.recaptchaenterprise.v1.AppleDeveloperIdOrBuilder> + appleDeveloperIdBuilder_; + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + * + * @return Whether the appleDeveloperId field is set. + */ + public boolean hasAppleDeveloperId() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + * + * @return The appleDeveloperId. + */ + public com.google.recaptchaenterprise.v1.AppleDeveloperId getAppleDeveloperId() { + if (appleDeveloperIdBuilder_ == null) { + return appleDeveloperId_ == null + ? com.google.recaptchaenterprise.v1.AppleDeveloperId.getDefaultInstance() + : appleDeveloperId_; + } else { + return appleDeveloperIdBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + */ + public Builder setAppleDeveloperId(com.google.recaptchaenterprise.v1.AppleDeveloperId value) { + if (appleDeveloperIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + appleDeveloperId_ = value; + } else { + appleDeveloperIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + */ + public Builder setAppleDeveloperId( + com.google.recaptchaenterprise.v1.AppleDeveloperId.Builder builderForValue) { + if (appleDeveloperIdBuilder_ == null) { + appleDeveloperId_ = builderForValue.build(); + } else { + appleDeveloperIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + */ + public Builder mergeAppleDeveloperId(com.google.recaptchaenterprise.v1.AppleDeveloperId value) { + if (appleDeveloperIdBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && appleDeveloperId_ != null + && appleDeveloperId_ + != com.google.recaptchaenterprise.v1.AppleDeveloperId.getDefaultInstance()) { + getAppleDeveloperIdBuilder().mergeFrom(value); + } else { + appleDeveloperId_ = value; + } + } else { + appleDeveloperIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + */ + public Builder clearAppleDeveloperId() { + bitField0_ = (bitField0_ & ~0x00000004); + appleDeveloperId_ = null; + if (appleDeveloperIdBuilder_ != null) { + appleDeveloperIdBuilder_.dispose(); + appleDeveloperIdBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + */ + public com.google.recaptchaenterprise.v1.AppleDeveloperId.Builder getAppleDeveloperIdBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAppleDeveloperIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + */ + public com.google.recaptchaenterprise.v1.AppleDeveloperIdOrBuilder + getAppleDeveloperIdOrBuilder() { + if (appleDeveloperIdBuilder_ != null) { + return appleDeveloperIdBuilder_.getMessageOrBuilder(); + } else { + return appleDeveloperId_ == null + ? com.google.recaptchaenterprise.v1.AppleDeveloperId.getDefaultInstance() + : appleDeveloperId_; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.AppleDeveloperId, + com.google.recaptchaenterprise.v1.AppleDeveloperId.Builder, + com.google.recaptchaenterprise.v1.AppleDeveloperIdOrBuilder> + getAppleDeveloperIdFieldBuilder() { + if (appleDeveloperIdBuilder_ == null) { + appleDeveloperIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.AppleDeveloperId, + com.google.recaptchaenterprise.v1.AppleDeveloperId.Builder, + com.google.recaptchaenterprise.v1.AppleDeveloperIdOrBuilder>( + getAppleDeveloperId(), getParentForChildren(), isClean()); + appleDeveloperId_ = null; + } + return appleDeveloperIdBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/IOSKeySettingsOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/IOSKeySettingsOrBuilder.java index 32a73c05fa8b..a8b0c93cba97 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/IOSKeySettingsOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/IOSKeySettingsOrBuilder.java @@ -90,4 +90,51 @@ public interface IOSKeySettingsOrBuilder * @return The bytes of the allowedBundleIds at the given index. */ com.google.protobuf.ByteString getAllowedBundleIdsBytes(int index); + + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + * + * @return Whether the appleDeveloperId field is set. + */ + boolean hasAppleDeveloperId(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + * + * @return The appleDeveloperId. + */ + com.google.recaptchaenterprise.v1.AppleDeveloperId getAppleDeveloperId(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.cloud.recaptchaenterprise.v1.AppleDeveloperId apple_developer_id = 3; + */ + com.google.recaptchaenterprise.v1.AppleDeveloperIdOrBuilder getAppleDeveloperIdOrBuilder(); } diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Key.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Key.java index 27de97cc7921..6fe65f70e660 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Key.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Key.java @@ -136,7 +136,7 @@ public PlatformSettingsCase getPlatformSettingsCase() { * *
    * The resource name for the Key in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * string name = 1; @@ -160,7 +160,7 @@ public java.lang.String getName() { * *
    * The resource name for the Key in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * string name = 1; @@ -415,8 +415,8 @@ public int getLabelsCount() { * * *
-   * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-   * Creating and managing labels</a>.
+   * See [Creating and managing labels]
+   * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
    * 
* * map<string, string> labels = 6; @@ -438,8 +438,8 @@ public java.util.Map getLabels() { * * *
-   * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-   * Creating and managing labels</a>.
+   * See [Creating and managing labels]
+   * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
    * 
* * map<string, string> labels = 6; @@ -452,8 +452,8 @@ public java.util.Map getLabelsMap() { * * *
-   * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-   * Creating and managing labels</a>.
+   * See [Creating and managing labels]
+   * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
    * 
* * map<string, string> labels = 6; @@ -473,8 +473,8 @@ public java.util.Map getLabelsMap() { * * *
-   * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-   * Creating and managing labels</a>.
+   * See [Creating and managing labels]
+   * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
    * 
* * map<string, string> labels = 6; @@ -497,7 +497,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * * *
-   * Output only. The timestamp corresponding to the creation of this Key.
+   * Output only. The timestamp corresponding to the creation of this key.
    * 
* * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -513,7 +513,7 @@ public boolean hasCreateTime() { * * *
-   * Output only. The timestamp corresponding to the creation of this Key.
+   * Output only. The timestamp corresponding to the creation of this key.
    * 
* * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -529,7 +529,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-   * Output only. The timestamp corresponding to the creation of this Key.
+   * Output only. The timestamp corresponding to the creation of this key.
    * 
* * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1295,7 +1295,7 @@ public Builder clearPlatformSettings() { * *
      * The resource name for the Key in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * string name = 1; @@ -1318,7 +1318,7 @@ public java.lang.String getName() { * *
      * The resource name for the Key in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * string name = 1; @@ -1341,7 +1341,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * The resource name for the Key in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * string name = 1; @@ -1363,7 +1363,7 @@ public Builder setName(java.lang.String value) { * *
      * The resource name for the Key in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * string name = 1; @@ -1381,7 +1381,7 @@ public Builder clearName() { * *
      * The resource name for the Key in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * string name = 1; @@ -2169,8 +2169,8 @@ public int getLabelsCount() { * * *
-     * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-     * Creating and managing labels</a>.
+     * See [Creating and managing labels]
+     * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
      * 
* * map<string, string> labels = 6; @@ -2192,8 +2192,8 @@ public java.util.Map getLabels() { * * *
-     * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-     * Creating and managing labels</a>.
+     * See [Creating and managing labels]
+     * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
      * 
* * map<string, string> labels = 6; @@ -2206,8 +2206,8 @@ public java.util.Map getLabelsMap() { * * *
-     * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-     * Creating and managing labels</a>.
+     * See [Creating and managing labels]
+     * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
      * 
* * map<string, string> labels = 6; @@ -2227,8 +2227,8 @@ public java.util.Map getLabelsMap() { * * *
-     * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-     * Creating and managing labels</a>.
+     * See [Creating and managing labels]
+     * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
      * 
* * map<string, string> labels = 6; @@ -2254,8 +2254,8 @@ public Builder clearLabels() { * * *
-     * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-     * Creating and managing labels</a>.
+     * See [Creating and managing labels]
+     * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
      * 
* * map<string, string> labels = 6; @@ -2277,8 +2277,8 @@ public java.util.Map getMutableLabels() { * * *
-     * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-     * Creating and managing labels</a>.
+     * See [Creating and managing labels]
+     * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
      * 
* * map<string, string> labels = 6; @@ -2298,8 +2298,8 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * * *
-     * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-     * Creating and managing labels</a>.
+     * See [Creating and managing labels]
+     * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
      * 
* * map<string, string> labels = 6; @@ -2320,7 +2320,7 @@ public Builder putAllLabels(java.util.Map va * * *
-     * Output only. The timestamp corresponding to the creation of this Key.
+     * Output only. The timestamp corresponding to the creation of this key.
      * 
* * @@ -2336,7 +2336,7 @@ public boolean hasCreateTime() { * * *
-     * Output only. The timestamp corresponding to the creation of this Key.
+     * Output only. The timestamp corresponding to the creation of this key.
      * 
* * @@ -2358,7 +2358,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-     * Output only. The timestamp corresponding to the creation of this Key.
+     * Output only. The timestamp corresponding to the creation of this key.
      * 
* * @@ -2382,7 +2382,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The timestamp corresponding to the creation of this Key.
+     * Output only. The timestamp corresponding to the creation of this key.
      * 
* * @@ -2403,7 +2403,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. The timestamp corresponding to the creation of this Key.
+     * Output only. The timestamp corresponding to the creation of this key.
      * 
* * @@ -2430,7 +2430,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The timestamp corresponding to the creation of this Key.
+     * Output only. The timestamp corresponding to the creation of this key.
      * 
* * @@ -2451,7 +2451,7 @@ public Builder clearCreateTime() { * * *
-     * Output only. The timestamp corresponding to the creation of this Key.
+     * Output only. The timestamp corresponding to the creation of this key.
      * 
* * @@ -2467,7 +2467,7 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * * *
-     * Output only. The timestamp corresponding to the creation of this Key.
+     * Output only. The timestamp corresponding to the creation of this key.
      * 
* * @@ -2487,7 +2487,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-     * Output only. The timestamp corresponding to the creation of this Key.
+     * Output only. The timestamp corresponding to the creation of this key.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/KeyOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/KeyOrBuilder.java index fb7102c02bd4..d4c68936862c 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/KeyOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/KeyOrBuilder.java @@ -28,7 +28,7 @@ public interface KeyOrBuilder * *
    * The resource name for the Key in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * string name = 1; @@ -41,7 +41,7 @@ public interface KeyOrBuilder * *
    * The resource name for the Key in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * string name = 1; @@ -184,8 +184,8 @@ public interface KeyOrBuilder * * *
-   * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-   * Creating and managing labels</a>.
+   * See [Creating and managing labels]
+   * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
    * 
* * map<string, string> labels = 6; @@ -195,8 +195,8 @@ public interface KeyOrBuilder * * *
-   * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-   * Creating and managing labels</a>.
+   * See [Creating and managing labels]
+   * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
    * 
* * map<string, string> labels = 6; @@ -209,8 +209,8 @@ public interface KeyOrBuilder * * *
-   * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-   * Creating and managing labels</a>.
+   * See [Creating and managing labels]
+   * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
    * 
* * map<string, string> labels = 6; @@ -220,8 +220,8 @@ public interface KeyOrBuilder * * *
-   * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-   * Creating and managing labels</a>.
+   * See [Creating and managing labels]
+   * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
    * 
* * map<string, string> labels = 6; @@ -235,8 +235,8 @@ java.lang.String getLabelsOrDefault( * * *
-   * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
-   * Creating and managing labels</a>.
+   * See [Creating and managing labels]
+   * (https://cloud.google.com/recaptcha-enterprise/docs/labels).
    * 
* * map<string, string> labels = 6; @@ -247,7 +247,7 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. The timestamp corresponding to the creation of this Key.
+   * Output only. The timestamp corresponding to the creation of this key.
    * 
* * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -260,7 +260,7 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. The timestamp corresponding to the creation of this Key.
+   * Output only. The timestamp corresponding to the creation of this key.
    * 
* * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -273,7 +273,7 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. The timestamp corresponding to the creation of this Key.
+   * Output only. The timestamp corresponding to the creation of this key.
    * 
* * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesRequest.java new file mode 100644 index 000000000000..8df356cbb677 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesRequest.java @@ -0,0 +1,936 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * The list firewall policies request message.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest} + */ +public final class ListFirewallPoliciesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest) + ListFirewallPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFirewallPoliciesRequest.newBuilder() to construct. + private ListFirewallPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFirewallPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFirewallPoliciesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest.class, + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the project to list the policies for, in the format
+   * `projects/{project}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the project to list the policies for, in the format
+   * `projects/{project}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of policies to return. Default is 10. Max
+   * limit is 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous.
+   * ListFirewallPoliciesRequest, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous.
+   * ListFirewallPoliciesRequest, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest other = + (com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The list firewall policies request message.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest) + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest.class, + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest build() { + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest buildPartial() { + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest result = + new com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest) { + return mergeFrom((com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest other) { + if (other + == com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the project to list the policies for, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the project to list the policies for, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the project to list the policies for, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the project to list the policies for, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the project to list the policies for, in the format
+     * `projects/{project}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of policies to return. Default is 10. Max
+     * limit is 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of policies to return. Default is 10. Max
+     * limit is 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of policies to return. Default is 10. Max
+     * limit is 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous.
+     * ListFirewallPoliciesRequest, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous.
+     * ListFirewallPoliciesRequest, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous.
+     * ListFirewallPoliciesRequest, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous.
+     * ListFirewallPoliciesRequest, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous.
+     * ListFirewallPoliciesRequest, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest) + private static final com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest(); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFirewallPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..81d66fc228a8 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface ListFirewallPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the project to list the policies for, in the format
+   * `projects/{project}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the project to list the policies for, in the format
+   * `projects/{project}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policies to return. Default is 10. Max
+   * limit is 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous.
+   * ListFirewallPoliciesRequest, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous.
+   * ListFirewallPoliciesRequest, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesResponse.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesResponse.java new file mode 100644 index 000000000000..6352a59cf145 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesResponse.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * Response to request to list firewall policies belonging to a key.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse} + */ +public final class ListFirewallPoliciesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse) + ListFirewallPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListFirewallPoliciesResponse.newBuilder() to construct. + private ListFirewallPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListFirewallPoliciesResponse() { + firewallPolicies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListFirewallPoliciesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse.class, + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse.Builder.class); + } + + public static final int FIREWALL_POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List firewallPolicies_; + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getFirewallPoliciesList() { + return firewallPolicies_; + } + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getFirewallPoliciesOrBuilderList() { + return firewallPolicies_; + } + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + @java.lang.Override + public int getFirewallPoliciesCount() { + return firewallPolicies_.size(); + } + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicies(int index) { + return firewallPolicies_.get(index); + } + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPoliciesOrBuilder( + int index) { + return firewallPolicies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no
+   * policies remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no
+   * policies remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < firewallPolicies_.size(); i++) { + output.writeMessage(1, firewallPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < firewallPolicies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, firewallPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse other = + (com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse) obj; + + if (!getFirewallPoliciesList().equals(other.getFirewallPoliciesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFirewallPoliciesCount() > 0) { + hash = (37 * hash) + FIREWALL_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getFirewallPoliciesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response to request to list firewall policies belonging to a key.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse) + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse.class, + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (firewallPoliciesBuilder_ == null) { + firewallPolicies_ = java.util.Collections.emptyList(); + } else { + firewallPolicies_ = null; + firewallPoliciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse build() { + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse buildPartial() { + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse result = + new com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse result) { + if (firewallPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + firewallPolicies_ = java.util.Collections.unmodifiableList(firewallPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.firewallPolicies_ = firewallPolicies_; + } else { + result.firewallPolicies_ = firewallPoliciesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse) { + return mergeFrom((com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse other) { + if (other + == com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse.getDefaultInstance()) + return this; + if (firewallPoliciesBuilder_ == null) { + if (!other.firewallPolicies_.isEmpty()) { + if (firewallPolicies_.isEmpty()) { + firewallPolicies_ = other.firewallPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFirewallPoliciesIsMutable(); + firewallPolicies_.addAll(other.firewallPolicies_); + } + onChanged(); + } + } else { + if (!other.firewallPolicies_.isEmpty()) { + if (firewallPoliciesBuilder_.isEmpty()) { + firewallPoliciesBuilder_.dispose(); + firewallPoliciesBuilder_ = null; + firewallPolicies_ = other.firewallPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + firewallPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFirewallPoliciesFieldBuilder() + : null; + } else { + firewallPoliciesBuilder_.addAllMessages(other.firewallPolicies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.recaptchaenterprise.v1.FirewallPolicy m = + input.readMessage( + com.google.recaptchaenterprise.v1.FirewallPolicy.parser(), + extensionRegistry); + if (firewallPoliciesBuilder_ == null) { + ensureFirewallPoliciesIsMutable(); + firewallPolicies_.add(m); + } else { + firewallPoliciesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List firewallPolicies_ = + java.util.Collections.emptyList(); + + private void ensureFirewallPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + firewallPolicies_ = + new java.util.ArrayList( + firewallPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder> + firewallPoliciesBuilder_; + + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public java.util.List + getFirewallPoliciesList() { + if (firewallPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(firewallPolicies_); + } else { + return firewallPoliciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public int getFirewallPoliciesCount() { + if (firewallPoliciesBuilder_ == null) { + return firewallPolicies_.size(); + } else { + return firewallPoliciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicies(int index) { + if (firewallPoliciesBuilder_ == null) { + return firewallPolicies_.get(index); + } else { + return firewallPoliciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public Builder setFirewallPolicies( + int index, com.google.recaptchaenterprise.v1.FirewallPolicy value) { + if (firewallPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFirewallPoliciesIsMutable(); + firewallPolicies_.set(index, value); + onChanged(); + } else { + firewallPoliciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public Builder setFirewallPolicies( + int index, com.google.recaptchaenterprise.v1.FirewallPolicy.Builder builderForValue) { + if (firewallPoliciesBuilder_ == null) { + ensureFirewallPoliciesIsMutable(); + firewallPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + firewallPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public Builder addFirewallPolicies(com.google.recaptchaenterprise.v1.FirewallPolicy value) { + if (firewallPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFirewallPoliciesIsMutable(); + firewallPolicies_.add(value); + onChanged(); + } else { + firewallPoliciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public Builder addFirewallPolicies( + int index, com.google.recaptchaenterprise.v1.FirewallPolicy value) { + if (firewallPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFirewallPoliciesIsMutable(); + firewallPolicies_.add(index, value); + onChanged(); + } else { + firewallPoliciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public Builder addFirewallPolicies( + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder builderForValue) { + if (firewallPoliciesBuilder_ == null) { + ensureFirewallPoliciesIsMutable(); + firewallPolicies_.add(builderForValue.build()); + onChanged(); + } else { + firewallPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public Builder addFirewallPolicies( + int index, com.google.recaptchaenterprise.v1.FirewallPolicy.Builder builderForValue) { + if (firewallPoliciesBuilder_ == null) { + ensureFirewallPoliciesIsMutable(); + firewallPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + firewallPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public Builder addAllFirewallPolicies( + java.lang.Iterable values) { + if (firewallPoliciesBuilder_ == null) { + ensureFirewallPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, firewallPolicies_); + onChanged(); + } else { + firewallPoliciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public Builder clearFirewallPolicies() { + if (firewallPoliciesBuilder_ == null) { + firewallPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + firewallPoliciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public Builder removeFirewallPolicies(int index) { + if (firewallPoliciesBuilder_ == null) { + ensureFirewallPoliciesIsMutable(); + firewallPolicies_.remove(index); + onChanged(); + } else { + firewallPoliciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy.Builder getFirewallPoliciesBuilder( + int index) { + return getFirewallPoliciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPoliciesOrBuilder( + int index) { + if (firewallPoliciesBuilder_ == null) { + return firewallPolicies_.get(index); + } else { + return firewallPoliciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public java.util.List + getFirewallPoliciesOrBuilderList() { + if (firewallPoliciesBuilder_ != null) { + return firewallPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(firewallPolicies_); + } + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy.Builder addFirewallPoliciesBuilder() { + return getFirewallPoliciesFieldBuilder() + .addBuilder(com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy.Builder addFirewallPoliciesBuilder( + int index) { + return getFirewallPoliciesFieldBuilder() + .addBuilder(index, com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Policy details.
+     * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + public java.util.List + getFirewallPoliciesBuilderList() { + return getFirewallPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder> + getFirewallPoliciesFieldBuilder() { + if (firewallPoliciesBuilder_ == null) { + firewallPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder>( + firewallPolicies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + firewallPolicies_ = null; + } + return firewallPoliciesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no
+     * policies remain in results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no
+     * policies remain in results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no
+     * policies remain in results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no
+     * policies remain in results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results. It is set to empty if no
+     * policies remain in results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse) + private static final com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse(); + } + + public static com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFirewallPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesResponseOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..c2e7b089f8a1 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListFirewallPoliciesResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface ListFirewallPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + java.util.List getFirewallPoliciesList(); + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicies(int index); + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + int getFirewallPoliciesCount(); + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + java.util.List + getFirewallPoliciesOrBuilderList(); + /** + * + * + *
+   * Policy details.
+   * 
+ * + * repeated .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policies = 1; + * + */ + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPoliciesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no
+   * policies remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results. It is set to empty if no
+   * policies remain in results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListKeysRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListKeysRequest.java index ab06da758149..9bfe19764cc9 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListKeysRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListKeysRequest.java @@ -72,7 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the project that contains the keys that will be
-   * listed, in the format "projects/{project}".
+   * listed, in the format `projects/{project}`.
    * 
* * @@ -98,7 +98,7 @@ public java.lang.String getParent() { * *
    * Required. The name of the project that contains the keys that will be
-   * listed, in the format "projects/{project}".
+   * listed, in the format `projects/{project}`.
    * 
* * @@ -586,7 +586,7 @@ public Builder mergeFrom( * *
      * Required. The name of the project that contains the keys that will be
-     * listed, in the format "projects/{project}".
+     * listed, in the format `projects/{project}`.
      * 
* * @@ -611,7 +611,7 @@ public java.lang.String getParent() { * *
      * Required. The name of the project that contains the keys that will be
-     * listed, in the format "projects/{project}".
+     * listed, in the format `projects/{project}`.
      * 
* * @@ -636,7 +636,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The name of the project that contains the keys that will be
-     * listed, in the format "projects/{project}".
+     * listed, in the format `projects/{project}`.
      * 
* * @@ -660,7 +660,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The name of the project that contains the keys that will be
-     * listed, in the format "projects/{project}".
+     * listed, in the format `projects/{project}`.
      * 
* * @@ -680,7 +680,7 @@ public Builder clearParent() { * *
      * Required. The name of the project that contains the keys that will be
-     * listed, in the format "projects/{project}".
+     * listed, in the format `projects/{project}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListKeysRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListKeysRequestOrBuilder.java index 210a64c36b92..30aab33fee78 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListKeysRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListKeysRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface ListKeysRequestOrBuilder * *
    * Required. The name of the project that contains the keys that will be
-   * listed, in the format "projects/{project}".
+   * listed, in the format `projects/{project}`.
    * 
* * @@ -43,7 +43,7 @@ public interface ListKeysRequestOrBuilder * *
    * Required. The name of the project that contains the keys that will be
-   * listed, in the format "projects/{project}".
+   * listed, in the format `projects/{project}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListRelatedAccountGroupsRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListRelatedAccountGroupsRequest.java index 49fd80ed9602..8edacb9bbf68 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListRelatedAccountGroupsRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListRelatedAccountGroupsRequest.java @@ -73,7 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the project to list related account groups from, in
-   * the format "projects/{project}".
+   * the format `projects/{project}`.
    * 
* * @@ -99,7 +99,7 @@ public java.lang.String getParent() { * *
    * Required. The name of the project to list related account groups from, in
-   * the format "projects/{project}".
+   * the format `projects/{project}`.
    * 
* * @@ -603,7 +603,7 @@ public Builder mergeFrom( * *
      * Required. The name of the project to list related account groups from, in
-     * the format "projects/{project}".
+     * the format `projects/{project}`.
      * 
* * @@ -628,7 +628,7 @@ public java.lang.String getParent() { * *
      * Required. The name of the project to list related account groups from, in
-     * the format "projects/{project}".
+     * the format `projects/{project}`.
      * 
* * @@ -653,7 +653,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The name of the project to list related account groups from, in
-     * the format "projects/{project}".
+     * the format `projects/{project}`.
      * 
* * @@ -677,7 +677,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The name of the project to list related account groups from, in
-     * the format "projects/{project}".
+     * the format `projects/{project}`.
      * 
* * @@ -697,7 +697,7 @@ public Builder clearParent() { * *
      * Required. The name of the project to list related account groups from, in
-     * the format "projects/{project}".
+     * the format `projects/{project}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListRelatedAccountGroupsRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListRelatedAccountGroupsRequestOrBuilder.java index b759740bad3e..e8b5b670a16c 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListRelatedAccountGroupsRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ListRelatedAccountGroupsRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface ListRelatedAccountGroupsRequestOrBuilder * *
    * Required. The name of the project to list related account groups from, in
-   * the format "projects/{project}".
+   * the format `projects/{project}`.
    * 
* * @@ -43,7 +43,7 @@ public interface ListRelatedAccountGroupsRequestOrBuilder * *
    * Required. The name of the project to list related account groups from, in
-   * the format "projects/{project}".
+   * the format `projects/{project}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Metrics.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Metrics.java index e9fc3eb3fac3..34aafa4a6b6f 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Metrics.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Metrics.java @@ -73,7 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Output only. The name of the metrics, in the format
-   * "projects/{project}/keys/{key}/metrics".
+   * `projects/{project}/keys/{key}/metrics`.
    * 
* * string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * Output only. The name of the metrics, in the format
-   * "projects/{project}/keys/{key}/metrics".
+   * `projects/{project}/keys/{key}/metrics`.
    * 
* * string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -845,7 +845,7 @@ public Builder mergeFrom( * *
      * Output only. The name of the metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -868,7 +868,7 @@ public java.lang.String getName() { * *
      * Output only. The name of the metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -891,7 +891,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Output only. The name of the metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -913,7 +913,7 @@ public Builder setName(java.lang.String value) { * *
      * Output only. The name of the metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -931,7 +931,7 @@ public Builder clearName() { * *
      * Output only. The name of the metrics, in the format
-     * "projects/{project}/keys/{key}/metrics".
+     * `projects/{project}/keys/{key}/metrics`.
      * 
* * string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MetricsOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MetricsOrBuilder.java index 9165985a1202..b0a5e59213b8 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MetricsOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MetricsOrBuilder.java @@ -28,7 +28,7 @@ public interface MetricsOrBuilder * *
    * Output only. The name of the metrics, in the format
-   * "projects/{project}/keys/{key}/metrics".
+   * `projects/{project}/keys/{key}/metrics`.
    * 
* * string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -41,7 +41,7 @@ public interface MetricsOrBuilder * *
    * Output only. The name of the metrics, in the format
-   * "projects/{project}/keys/{key}/metrics".
+   * `projects/{project}/keys/{key}/metrics`.
    * 
* * string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MigrateKeyRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MigrateKeyRequest.java index cf82bd981eb9..74e2f010dc01 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MigrateKeyRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MigrateKeyRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the key to be migrated, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * Required. The name of the key to be migrated, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * @@ -514,7 +514,7 @@ public Builder mergeFrom( * *
      * Required. The name of the key to be migrated, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -539,7 +539,7 @@ public java.lang.String getName() { * *
      * Required. The name of the key to be migrated, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -564,7 +564,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The name of the key to be migrated, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -588,7 +588,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The name of the key to be migrated, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * @@ -608,7 +608,7 @@ public Builder clearName() { * *
      * Required. The name of the key to be migrated, in the format
-     * "projects/{project}/keys/{key}".
+     * `projects/{project}/keys/{key}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MigrateKeyRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MigrateKeyRequestOrBuilder.java index aa837e27c46f..219dcff6280a 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MigrateKeyRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/MigrateKeyRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface MigrateKeyRequestOrBuilder * *
    * Required. The name of the key to be migrated, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * @@ -43,7 +43,7 @@ public interface MigrateKeyRequestOrBuilder * *
    * Required. The name of the key to be migrated, in the format
-   * "projects/{project}/keys/{key}".
+   * `projects/{project}/keys/{key}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RecaptchaEnterpriseProto.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RecaptchaEnterpriseProto.java index fe1cfc8f57ee..9be69d280f42 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RecaptchaEnterpriseProto.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RecaptchaEnterpriseProto.java @@ -103,6 +103,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_CardTestingVerdict_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_CardTestingVerdict_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_recaptchaenterprise_v1_AccountDefenderAssessment_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -135,6 +151,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_recaptchaenterprise_v1_DeleteKeyRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_recaptchaenterprise_v1_DeleteKeyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_recaptchaenterprise_v1_MigrateKeyRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -175,6 +215,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_recaptchaenterprise_v1_IOSKeySettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_recaptchaenterprise_v1_IOSKeySettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_recaptchaenterprise_v1_ScoreDistribution_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -195,6 +239,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_recaptchaenterprise_v1_ChallengeMetrics_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_recaptchaenterprise_v1_ChallengeMetrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupMembershipsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -247,382 +323,489 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle/api/field_behavior.proto\032\031google/api" + "/resource.proto\032\033google/protobuf/empty.p" + "roto\032 google/protobuf/field_mask.proto\032\037" - + "google/protobuf/timestamp.proto\"\252\001\n\027Crea" - + "teAssessmentRequest\022D\n\006parent\030\001 \001(\tB4\342A\001" - + "\002\372A-\n+cloudresourcemanager.googleapis.co" - + "m/Project\022I\n\nassessment\030\002 \001(\0132/.google.c" - + "loud.recaptchaenterprise.v1.AssessmentB\004" - + "\342A\001\002\"\226\005\n\020TransactionEvent\022d\n\nevent_type\030" - + "\001 \001(\0162J.google.cloud.recaptchaenterprise" - + ".v1.TransactionEvent.TransactionEventTyp" - + "eB\004\342A\001\001\022\024\n\006reason\030\002 \001(\tB\004\342A\001\001\022\023\n\005value\030\003" - + " \001(\001B\004\342A\001\001\0224\n\nevent_time\030\004 \001(\0132\032.google." - + "protobuf.TimestampB\004\342A\001\001\"\272\003\n\024Transaction" - + "EventType\022&\n\"TRANSACTION_EVENT_TYPE_UNSP" - + "ECIFIED\020\000\022\024\n\020MERCHANT_APPROVE\020\001\022\021\n\rMERCH" - + "ANT_DENY\020\002\022\021\n\rMANUAL_REVIEW\020\003\022\021\n\rAUTHORI" - + "ZATION\020\004\022\031\n\025AUTHORIZATION_DECLINE\020\005\022\023\n\017P" - + "AYMENT_CAPTURE\020\006\022\033\n\027PAYMENT_CAPTURE_DECL" - + "INE\020\007\022\n\n\006CANCEL\020\010\022\026\n\022CHARGEBACK_INQUIRY\020" - + "\t\022\024\n\020CHARGEBACK_ALERT\020\n\022\026\n\022FRAUD_NOTIFIC" - + "ATION\020\013\022\016\n\nCHARGEBACK\020\014\022\034\n\030CHARGEBACK_RE" - + "PRESENTMENT\020\r\022\026\n\022CHARGEBACK_REVERSE\020\016\022\022\n" - + "\016REFUND_REQUEST\020\017\022\022\n\016REFUND_DECLINE\020\020\022\n\n" - + "\006REFUND\020\021\022\022\n\016REFUND_REVERSE\020\022\"\357\006\n\031Annota" - + "teAssessmentRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372" - + "A/\n-recaptchaenterprise.googleapis.com/A" - + "ssessment\022c\n\nannotation\030\002 \001(\0162I.google.c" - + "loud.recaptchaenterprise.v1.AnnotateAsse" - + "ssmentRequest.AnnotationB\004\342A\001\001\022\\\n\007reason" - + "s\030\003 \003(\0162E.google.cloud.recaptchaenterpri" - + "se.v1.AnnotateAssessmentRequest.ReasonB\004" - + "\342A\001\001\022\037\n\021hashed_account_id\030\004 \001(\014B\004\342A\001\001\022V\n" - + "\021transaction_event\030\005 \001(\01325.google.cloud." - + "recaptchaenterprise.v1.TransactionEventB" - + "\004\342A\001\001\"~\n\nAnnotation\022\032\n\026ANNOTATION_UNSPEC" - + "IFIED\020\000\022\016\n\nLEGITIMATE\020\001\022\016\n\nFRAUDULENT\020\002\022" - + "\030\n\020PASSWORD_CORRECT\020\003\032\002\010\001\022\032\n\022PASSWORD_IN" - + "CORRECT\020\004\032\002\010\001\"\317\002\n\006Reason\022\026\n\022REASON_UNSPE" - + "CIFIED\020\000\022\016\n\nCHARGEBACK\020\001\022\024\n\020CHARGEBACK_F" - + "RAUD\020\010\022\026\n\022CHARGEBACK_DISPUTE\020\t\022\n\n\006REFUND" - + "\020\n\022\020\n\014REFUND_FRAUD\020\013\022\030\n\024TRANSACTION_ACCE" - + "PTED\020\014\022\030\n\024TRANSACTION_DECLINED\020\r\022\026\n\022PAYM" - + "ENT_HEURISTICS\020\002\022\030\n\024INITIATED_TWO_FACTOR" - + "\020\007\022\025\n\021PASSED_TWO_FACTOR\020\003\022\025\n\021FAILED_TWO_" - + "FACTOR\020\004\022\024\n\020CORRECT_PASSWORD\020\005\022\026\n\022INCORR" - + "ECT_PASSWORD\020\006\022\017\n\013SOCIAL_SPAM\020\016\"\034\n\032Annot" - + "ateAssessmentResponse\"\266\001\n\030EndpointVerifi" - + "cationInfo\022\027\n\remail_address\030\001 \001(\tH\000\022\026\n\014p" - + "hone_number\030\002 \001(\tH\000\022\033\n\rrequest_token\030\003 \001" - + "(\tB\004\342A\001\003\022@\n\026last_verification_time\030\004 \001(\013" - + "2\032.google.protobuf.TimestampB\004\342A\001\003B\n\n\010en" - + "dpoint\"\322\004\n\027AccountVerificationInfo\022P\n\ten" - + "dpoints\030\001 \003(\0132=.google.cloud.recaptchaen" - + "terprise.v1.EndpointVerificationInfo\022\025\n\r" - + "language_code\030\003 \001(\t\022m\n\032latest_verificati" - + "on_result\030\007 \001(\0162C.google.cloud.recaptcha" - + "enterprise.v1.AccountVerificationInfo.Re" - + "sultB\004\342A\001\003\022\024\n\010username\030\002 \001(\tB\002\030\001\"\310\002\n\006Res" - + "ult\022\026\n\022RESULT_UNSPECIFIED\020\000\022\031\n\025SUCCESS_U" - + "SER_VERIFIED\020\001\022\033\n\027ERROR_USER_NOT_VERIFIE" - + "D\020\002\022$\n ERROR_SITE_ONBOARDING_INCOMPLETE\020" - + "\003\022\037\n\033ERROR_RECIPIENT_NOT_ALLOWED\020\004\022)\n%ER" - + "ROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED\020\005\022\033\n" - + "\027ERROR_CRITICAL_INTERNAL\020\006\022\"\n\036ERROR_CUST" - + "OMER_QUOTA_EXHAUSTED\020\007\022\037\n\033ERROR_VERIFICA" - + "TION_BYPASSED\020\010\022\032\n\026ERROR_VERDICT_MISMATC" - + "H\020\t\"\320\001\n\037PrivatePasswordLeakVerification\022" - + " \n\022lookup_hash_prefix\030\001 \001(\014B\004\342A\001\001\022-\n\037enc" - + "rypted_user_credentials_hash\030\002 \001(\014B\004\342A\001\001" - + "\022+\n\035encrypted_leak_match_prefixes\030\003 \003(\014B" - + "\004\342A\001\003\022/\n!reencrypted_user_credentials_ha" - + "sh\030\004 \001(\014B\004\342A\001\003\"\372\005\n\nAssessment\022\022\n\004name\030\001 " - + "\001(\tB\004\342A\001\003\0229\n\005event\030\002 \001(\0132*.google.cloud." - + "recaptchaenterprise.v1.Event\022N\n\rrisk_ana" - + "lysis\030\003 \001(\01321.google.cloud.recaptchaente" - + "rprise.v1.RiskAnalysisB\004\342A\001\003\022T\n\020token_pr" - + "operties\030\004 \001(\01324.google.cloud.recaptchae" - + "nterprise.v1.TokenPropertiesB\004\342A\001\003\022Z\n\024ac" - + "count_verification\030\005 \001(\0132<.google.cloud." - + "recaptchaenterprise.v1.AccountVerificati" - + "onInfo\022c\n\033account_defender_assessment\030\006 " - + "\001(\0132>.google.cloud.recaptchaenterprise.v" - + "1.AccountDefenderAssessment\022p\n\"private_p" - + "assword_leak_verification\030\010 \001(\0132D.google" - + ".cloud.recaptchaenterprise.v1.PrivatePas" - + "swordLeakVerification\022c\n\033fraud_preventio" - + "n_assessment\030\013 \001(\0132>.google.cloud.recapt" - + "chaenterprise.v1.FraudPreventionAssessme" - + "nt:_\352A\\\n-recaptchaenterprise.googleapis." - + "com/Assessment\022+projects/{project}/asses" - + "sments/{assessment}\"\203\002\n\005Event\022\023\n\005token\030\001" - + " \001(\tB\004\342A\001\001\022\026\n\010site_key\030\002 \001(\tB\004\342A\001\001\022\030\n\nus" - + "er_agent\030\003 \001(\tB\004\342A\001\001\022\035\n\017user_ip_address\030" - + "\004 \001(\tB\004\342A\001\001\022\035\n\017expected_action\030\005 \001(\tB\004\342A" - + "\001\001\022\037\n\021hashed_account_id\030\006 \001(\014B\004\342A\001\001\022T\n\020t" - + "ransaction_data\030\r \001(\01324.google.cloud.rec" - + "aptchaenterprise.v1.TransactionDataB\004\342A\001" - + "\001\"\377\010\n\017TransactionData\022\033\n\016transaction_id\030" - + "\013 \001(\tH\000\210\001\001\022\026\n\016payment_method\030\001 \001(\t\022\020\n\010ca" - + "rd_bin\030\002 \001(\t\022\026\n\016card_last_four\030\003 \001(\t\022\025\n\r" - + "currency_code\030\004 \001(\t\022\r\n\005value\030\005 \001(\001\022\026\n\016sh" - + "ipping_value\030\014 \001(\001\022V\n\020shipping_address\030\006" - + " \001(\0132<.google.cloud.recaptchaenterprise." - + "v1.TransactionData.Address\022U\n\017billing_ad" - + "dress\030\007 \001(\0132<.google.cloud.recaptchaente" - + "rprise.v1.TransactionData.Address\022G\n\004use" - + "r\030\010 \001(\01329.google.cloud.recaptchaenterpri" - + "se.v1.TransactionData.User\022L\n\tmerchants\030" - + "\r \003(\01329.google.cloud.recaptchaenterprise" - + ".v1.TransactionData.User\022H\n\005items\030\016 \003(\0132" - + "9.google.cloud.recaptchaenterprise.v1.Tr" - + "ansactionData.Item\022V\n\014gateway_info\030\n \001(\013" - + "2@.google.cloud.recaptchaenterprise.v1.T" - + "ransactionData.GatewayInfo\032\206\001\n\007Address\022\021" - + "\n\trecipient\030\001 \001(\t\022\017\n\007address\030\002 \003(\t\022\020\n\010lo" - + "cality\030\003 \001(\t\022\033\n\023administrative_area\030\004 \001(" - + "\t\022\023\n\013region_code\030\005 \001(\t\022\023\n\013postal_code\030\006 " - + "\001(\t\032\204\001\n\004User\022\022\n\naccount_id\030\006 \001(\t\022\023\n\013crea" - + "tion_ms\030\001 \001(\003\022\r\n\005email\030\002 \001(\t\022\026\n\016email_ve" - + "rified\030\003 \001(\010\022\024\n\014phone_number\030\004 \001(\t\022\026\n\016ph" - + "one_verified\030\005 \001(\010\032R\n\004Item\022\014\n\004name\030\001 \001(\t" - + "\022\r\n\005value\030\002 \001(\001\022\020\n\010quantity\030\003 \001(\003\022\033\n\023mer" - + "chant_account_id\030\004 \001(\t\032p\n\013GatewayInfo\022\014\n" - + "\004name\030\001 \001(\t\022\035\n\025gateway_response_code\030\002 \001" - + "(\t\022\031\n\021avs_response_code\030\003 \001(\t\022\031\n\021cvv_res" - + "ponse_code\030\004 \001(\tB\021\n\017_transaction_id\"\342\002\n\014" - + "RiskAnalysis\022\r\n\005score\030\001 \001(\002\022W\n\007reasons\030\002" - + " \003(\0162F.google.cloud.recaptchaenterprise." - + "v1.RiskAnalysis.ClassificationReason\"\351\001\n" - + "\024ClassificationReason\022%\n!CLASSIFICATION_" - + "REASON_UNSPECIFIED\020\000\022\016\n\nAUTOMATION\020\001\022\032\n\026" - + "UNEXPECTED_ENVIRONMENT\020\002\022\024\n\020TOO_MUCH_TRA" - + "FFIC\020\003\022\035\n\031UNEXPECTED_USAGE_PATTERNS\020\004\022\030\n" - + "\024LOW_CONFIDENCE_SCORE\020\005\022\025\n\021SUSPECTED_CAR" - + "DING\020\006\022\030\n\024SUSPECTED_CHARGEBACK\020\007\"\230\003\n\017Tok" - + "enProperties\022\r\n\005valid\030\001 \001(\010\022Z\n\016invalid_r" - + "eason\030\002 \001(\0162B.google.cloud.recaptchaente" - + "rprise.v1.TokenProperties.InvalidReason\022" - + "/\n\013create_time\030\003 \001(\0132\032.google.protobuf.T" - + "imestamp\022\020\n\010hostname\030\004 \001(\t\022\034\n\024android_pa" - + "ckage_name\030\010 \001(\t\022\025\n\rios_bundle_id\030\t \001(\t\022" - + "\016\n\006action\030\005 \001(\t\"\221\001\n\rInvalidReason\022\036\n\032INV" - + "ALID_REASON_UNSPECIFIED\020\000\022\032\n\026UNKNOWN_INV" - + "ALID_REASON\020\001\022\r\n\tMALFORMED\020\002\022\013\n\007EXPIRED\020" - + "\003\022\010\n\004DUPE\020\004\022\013\n\007MISSING\020\005\022\021\n\rBROWSER_ERRO" - + "R\020\006\"\356\002\n\031FraudPreventionAssessment\022\030\n\020tra" - + "nsaction_risk\030\001 \001(\002\022y\n\031stolen_instrument" - + "_verdict\030\002 \001(\0132V.google.cloud.recaptchae" - + "nterprise.v1.FraudPreventionAssessment.S" - + "tolenInstrumentVerdict\022o\n\024card_testing_v" - + "erdict\030\003 \001(\0132Q.google.cloud.recaptchaent" - + "erprise.v1.FraudPreventionAssessment.Car" - + "dTestingVerdict\032\'\n\027StolenInstrumentVerdi" - + "ct\022\014\n\004risk\030\001 \001(\002\032\"\n\022CardTestingVerdict\022\014" - + "\n\004risk\030\001 \001(\002\"\266\002\n\031AccountDefenderAssessme" - + "nt\022c\n\006labels\030\001 \003(\0162S.google.cloud.recapt" - + "chaenterprise.v1.AccountDefenderAssessme" - + "nt.AccountDefenderLabel\"\263\001\n\024AccountDefen" - + "derLabel\022&\n\"ACCOUNT_DEFENDER_LABEL_UNSPE" - + "CIFIED\020\000\022\021\n\rPROFILE_MATCH\020\001\022\035\n\031SUSPICIOU" - + "S_LOGIN_ACTIVITY\020\002\022\037\n\033SUSPICIOUS_ACCOUNT" - + "_CREATION\020\003\022 \n\034RELATED_ACCOUNTS_NUMBER_H" - + "IGH\020\004\"\225\001\n\020CreateKeyRequest\022D\n\006parent\030\001 \001" - + "(\tB4\342A\001\002\372A-\n+cloudresourcemanager.google" - + "apis.com/Project\022;\n\003key\030\002 \001(\0132(.google.c" - + "loud.recaptchaenterprise.v1.KeyB\004\342A\001\002\"\212\001" - + "\n\017ListKeysRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372" - + "A-\n+cloudresourcemanager.googleapis.com/" - + "Project\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage" - + "_token\030\003 \001(\tB\004\342A\001\001\"c\n\020ListKeysResponse\0226" - + "\n\004keys\030\001 \003(\0132(.google.cloud.recaptchaent" - + "erprise.v1.Key\022\027\n\017next_page_token\030\002 \001(\t\"" - + "^\n\036RetrieveLegacySecretKeyRequest\022<\n\003key" - + "\030\001 \001(\tB/\342A\001\002\372A(\n&recaptchaenterprise.goo" - + "gleapis.com/Key\"N\n\rGetKeyRequest\022=\n\004name" - + "\030\001 \001(\tB/\342A\001\002\372A(\n&recaptchaenterprise.goo" - + "gleapis.com/Key\"\206\001\n\020UpdateKeyRequest\022;\n\003" - + "key\030\001 \001(\0132(.google.cloud.recaptchaenterp" - + "rise.v1.KeyB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032" - + ".google.protobuf.FieldMaskB\004\342A\001\001\"Q\n\020Dele" - + "teKeyRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&rec" - + "aptchaenterprise.googleapis.com/Key\"t\n\021M" - + "igrateKeyRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n" - + "&recaptchaenterprise.googleapis.com/Key\022" - + " \n\022skip_billing_check\030\002 \001(\010B\004\342A\001\001\"V\n\021Get" - + "MetricsRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*r" - + "ecaptchaenterprise.googleapis.com/Metric" - + "s\"\301\002\n\007Metrics\022\022\n\004name\030\004 \001(\tB\004\342A\001\003\022.\n\nsta" - + "rt_time\030\001 \001(\0132\032.google.protobuf.Timestam" - + "p\022H\n\rscore_metrics\030\002 \003(\01321.google.cloud." - + "recaptchaenterprise.v1.ScoreMetrics\022P\n\021c" - + "hallenge_metrics\030\003 \003(\01325.google.cloud.re" - + "captchaenterprise.v1.ChallengeMetrics:V\352" - + "AS\n*recaptchaenterprise.googleapis.com/M" - + "etrics\022%projects/{project}/keys/{key}/me" - + "trics\"<\n\037RetrieveLegacySecretKeyResponse" - + "\022\031\n\021legacy_secret_key\030\001 \001(\t\"\273\005\n\003Key\022\014\n\004n" - + "ame\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022K\n\014web_s" - + "ettings\030\003 \001(\01323.google.cloud.recaptchaen" - + "terprise.v1.WebKeySettingsH\000\022S\n\020android_" - + "settings\030\004 \001(\01327.google.cloud.recaptchae" - + "nterprise.v1.AndroidKeySettingsH\000\022K\n\014ios" - + "_settings\030\005 \001(\01323.google.cloud.recaptcha" - + "enterprise.v1.IOSKeySettingsH\000\022D\n\006labels" - + "\030\006 \003(\01324.google.cloud.recaptchaenterpris" - + "e.v1.Key.LabelsEntry\0225\n\013create_time\030\007 \001(" - + "\0132\032.google.protobuf.TimestampB\004\342A\001\003\022L\n\017t" - + "esting_options\030\t \001(\01323.google.cloud.reca" - + "ptchaenterprise.v1.TestingOptions\022F\n\014waf" - + "_settings\030\n \001(\01320.google.cloud.recaptcha" - + "enterprise.v1.WafSettings\032-\n\013LabelsEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:J\352AG\n&r" - + "ecaptchaenterprise.googleapis.com/Key\022\035p" - + "rojects/{project}/keys/{key}B\023\n\021platform" - + "_settings\"\350\001\n\016TestingOptions\022\025\n\rtesting_" - + "score\030\001 \001(\002\022_\n\021testing_challenge\030\002 \001(\0162D" - + ".google.cloud.recaptchaenterprise.v1.Tes" - + "tingOptions.TestingChallenge\"^\n\020TestingC" - + "hallenge\022!\n\035TESTING_CHALLENGE_UNSPECIFIE" - + "D\020\000\022\r\n\tNOCAPTCHA\020\001\022\030\n\024UNSOLVABLE_CHALLEN" - + "GE\020\002\"\221\004\n\016WebKeySettings\022\031\n\021allow_all_dom" - + "ains\030\003 \001(\010\022\027\n\017allowed_domains\030\001 \003(\t\022\031\n\021a" - + "llow_amp_traffic\030\002 \001(\010\022c\n\020integration_ty" - + "pe\030\004 \001(\0162C.google.cloud.recaptchaenterpr" - + "ise.v1.WebKeySettings.IntegrationTypeB\004\342" - + "A\001\002\022v\n\035challenge_security_preference\030\005 \001" - + "(\0162O.google.cloud.recaptchaenterprise.v1" - + ".WebKeySettings.ChallengeSecurityPrefere" - + "nce\"[\n\017IntegrationType\022 \n\034INTEGRATION_TY" - + "PE_UNSPECIFIED\020\000\022\t\n\005SCORE\020\001\022\014\n\010CHECKBOX\020" - + "\002\022\r\n\tINVISIBLE\020\003\"v\n\033ChallengeSecurityPre" - + "ference\022-\n)CHALLENGE_SECURITY_PREFERENCE" - + "_UNSPECIFIED\020\000\022\r\n\tUSABILITY\020\001\022\013\n\007BALANCE" - + "\020\002\022\014\n\010SECURITY\020\003\"T\n\022AndroidKeySettings\022\037" - + "\n\027allow_all_package_names\030\002 \001(\010\022\035\n\025allow" - + "ed_package_names\030\001 \003(\t\"J\n\016IOSKeySettings" - + "\022\034\n\024allow_all_bundle_ids\030\002 \001(\010\022\032\n\022allowe" - + "d_bundle_ids\030\001 \003(\t\"\251\001\n\021ScoreDistribution" - + "\022_\n\rscore_buckets\030\001 \003(\0132H.google.cloud.r" - + "ecaptchaenterprise.v1.ScoreDistribution." - + "ScoreBucketsEntry\0323\n\021ScoreBucketsEntry\022\013" - + "\n\003key\030\001 \001(\005\022\r\n\005value\030\002 \001(\003:\0028\001\"\253\002\n\014Score" - + "Metrics\022O\n\017overall_metrics\030\001 \001(\01326.googl" - + "e.cloud.recaptchaenterprise.v1.ScoreDist" - + "ribution\022\\\n\016action_metrics\030\002 \003(\0132D.googl" - + "e.cloud.recaptchaenterprise.v1.ScoreMetr" - + "ics.ActionMetricsEntry\032l\n\022ActionMetricsE" - + "ntry\022\013\n\003key\030\001 \001(\t\022E\n\005value\030\002 \001(\01326.googl" - + "e.cloud.recaptchaenterprise.v1.ScoreDist" - + "ribution:\0028\001\"o\n\020ChallengeMetrics\022\026\n\016page" - + "load_count\030\001 \001(\003\022\027\n\017nocaptcha_count\030\002 \001(" - + "\003\022\024\n\014failed_count\030\003 \001(\003\022\024\n\014passed_count\030" - + "\004 \001(\003\"\271\001\n)ListRelatedAccountGroupMembers" - + "hipsRequest\022Y\n\006parent\030\001 \001(\tBI\342A\001\002\372AB\022@re" - + "captchaenterprise.googleapis.com/Related" - + "AccountGroupMembership\022\027\n\tpage_size\030\002 \001(" - + "\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\"\264\001\n*Li" - + "stRelatedAccountGroupMembershipsResponse" - + "\022m\n!related_account_group_memberships\030\001 " - + "\003(\0132B.google.cloud.recaptchaenterprise.v" - + "1.RelatedAccountGroupMembership\022\027\n\017next_" - + "page_token\030\002 \001(\t\"\245\001\n\037ListRelatedAccountG" - + "roupsRequest\022O\n\006parent\030\001 \001(\tB?\342A\001\002\372A8\0226r" - + "ecaptchaenterprise.googleapis.com/Relate" - + "dAccountGroup\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030" - + "\n\npage_token\030\003 \001(\tB\004\342A\001\001\"\225\001\n ListRelated" - + "AccountGroupsResponse\022X\n\026related_account" - + "_groups\030\001 \003(\01328.google.cloud.recaptchaen" - + "terprise.v1.RelatedAccountGroup\022\027\n\017next_" - + "page_token\030\002 \001(\t\"\335\001\n+SearchRelatedAccoun" - + "tGroupMembershipsRequest\022Z\n\007project\030\001 \001(" - + "\tBI\342A\001\002\372AB\022@recaptchaenterprise.googleap" - + "is.com/RelatedAccountGroupMembership\022\037\n\021" - + "hashed_account_id\030\002 \001(\014B\004\342A\001\001\022\027\n\tpage_si" - + "ze\030\003 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\004 \001(\tB\004\342A\001\001" - + "\"\266\001\n,SearchRelatedAccountGroupMembership" - + "sResponse\022m\n!related_account_group_membe" - + "rships\030\001 \003(\0132B.google.cloud.recaptchaent" - + "erprise.v1.RelatedAccountGroupMembership" - + "\022\027\n\017next_page_token\030\002 \001(\t\"\264\002\n\035RelatedAcc" - + "ountGroupMembership\022W\n\004name\030\001 \001(\tBI\342A\001\002\372" - + "AB\n@recaptchaenterprise.googleapis.com/R" - + "elatedAccountGroupMembership\022\031\n\021hashed_a" - + "ccount_id\030\002 \001(\014:\236\001\352A\232\001\n@recaptchaenterpr" - + "ise.googleapis.com/RelatedAccountGroupMe" - + "mbership\022Vprojects/{project}/relatedacco" - + "untgroups/{relatedaccountgroup}/membersh" - + "ips/{membership}\"\340\001\n\023RelatedAccountGroup" - + "\022M\n\004name\030\001 \001(\tB?\342A\001\002\372A8\n6recaptchaenterp" - + "rise.googleapis.com/RelatedAccountGroup:" - + "z\352Aw\n6recaptchaenterprise.googleapis.com" - + "/RelatedAccountGroup\022=projects/{project}" - + "/relatedaccountgroups/{relatedaccountgro" - + "up}\"\324\002\n\013WafSettings\022V\n\013waf_service\030\001 \001(\016" - + "2;.google.cloud.recaptchaenterprise.v1.W" - + "afSettings.WafServiceB\004\342A\001\002\022V\n\013waf_featu" - + "re\030\002 \001(\0162;.google.cloud.recaptchaenterpr" - + "ise.v1.WafSettings.WafFeatureB\004\342A\001\002\"b\n\nW" - + "afFeature\022\033\n\027WAF_FEATURE_UNSPECIFIED\020\000\022\022" - + "\n\016CHALLENGE_PAGE\020\001\022\021\n\rSESSION_TOKEN\020\002\022\020\n" - + "\014ACTION_TOKEN\020\003\"1\n\nWafService\022\033\n\027WAF_SER" - + "VICE_UNSPECIFIED\020\000\022\006\n\002CA\020\0012\261\025\n\032Recaptcha" - + "EnterpriseService\022\316\001\n\020CreateAssessment\022<" - + ".google.cloud.recaptchaenterprise.v1.Cre" - + "ateAssessmentRequest\032/.google.cloud.reca" - + "ptchaenterprise.v1.Assessment\"K\332A\021parent" - + ",assessment\202\323\344\223\0021\"#/v1/{parent=projects/" - + "*}/assessments:\nassessment\022\340\001\n\022AnnotateA" - + "ssessment\022>.google.cloud.recaptchaenterp" - + "rise.v1.AnnotateAssessmentRequest\032?.goog" - + "le.cloud.recaptchaenterprise.v1.Annotate" - + "AssessmentResponse\"I\332A\017name,annotation\202\323" - + "\344\223\0021\",/v1/{name=projects/*/assessments/*" - + "}:annotate:\001*\022\244\001\n\tCreateKey\0225.google.clo" - + "ud.recaptchaenterprise.v1.CreateKeyReque" - + "st\032(.google.cloud.recaptchaenterprise.v1" - + ".Key\"6\332A\nparent,key\202\323\344\223\002#\"\034/v1/{parent=p" - + "rojects/*}/keys:\003key\022\246\001\n\010ListKeys\0224.goog" - + "le.cloud.recaptchaenterprise.v1.ListKeys" - + "Request\0325.google.cloud.recaptchaenterpri" - + "se.v1.ListKeysResponse\"-\332A\006parent\202\323\344\223\002\036\022" - + "\034/v1/{parent=projects/*}/keys\022\347\001\n\027Retrie" - + "veLegacySecretKey\022C.google.cloud.recaptc" - + "haenterprise.v1.RetrieveLegacySecretKeyR" - + "equest\032D.google.cloud.recaptchaenterpris" - + "e.v1.RetrieveLegacySecretKeyResponse\"A\332A" - + "\003key\202\323\344\223\0025\0223/v1/{key=projects/*/keys/*}:" - + "retrieveLegacySecretKey\022\223\001\n\006GetKey\0222.goo" - + "gle.cloud.recaptchaenterprise.v1.GetKeyR" - + "equest\032(.google.cloud.recaptchaenterpris" - + "e.v1.Key\"+\332A\004name\202\323\344\223\002\036\022\034/v1/{name=proje" - + "cts/*/keys/*}\022\255\001\n\tUpdateKey\0225.google.clo" - + "ud.recaptchaenterprise.v1.UpdateKeyReque" - + "st\032(.google.cloud.recaptchaenterprise.v1" - + ".Key\"?\332A\017key,update_mask\202\323\344\223\002\'2 /v1/{key" - + ".name=projects/*/keys/*}:\003key\022\207\001\n\tDelete" - + "Key\0225.google.cloud.recaptchaenterprise.v" - + "1.DeleteKeyRequest\032\026.google.protobuf.Emp" - + "ty\"+\332A\004name\202\323\344\223\002\036*\034/v1/{name=projects/*/" - + "keys/*}\022\237\001\n\nMigrateKey\0226.google.cloud.re" - + "captchaenterprise.v1.MigrateKeyRequest\032(" - + ".google.cloud.recaptchaenterprise.v1.Key" - + "\"/\202\323\344\223\002)\"$/v1/{name=projects/*/keys/*}:m" - + "igrate:\001*\022\247\001\n\nGetMetrics\0226.google.cloud." - + "recaptchaenterprise.v1.GetMetricsRequest" - + "\032,.google.cloud.recaptchaenterprise.v1.M" - + "etrics\"3\332A\004name\202\323\344\223\002&\022$/v1/{name=project" - + "s/*/keys/*/metrics}\022\346\001\n\030ListRelatedAccou" - + "ntGroups\022D.google.cloud.recaptchaenterpr" - + "ise.v1.ListRelatedAccountGroupsRequest\032E" - + ".google.cloud.recaptchaenterprise.v1.Lis" - + "tRelatedAccountGroupsResponse\"=\332A\006parent" - + "\202\323\344\223\002.\022,/v1/{parent=projects/*}/relateda" - + "ccountgroups\022\222\002\n\"ListRelatedAccountGroup" - + "Memberships\022N.google.cloud.recaptchaente" - + "rprise.v1.ListRelatedAccountGroupMembers" - + "hipsRequest\032O.google.cloud.recaptchaente" - + "rprise.v1.ListRelatedAccountGroupMembers" - + "hipsResponse\"K\332A\006parent\202\323\344\223\002<\022:/v1/{pare" - + "nt=projects/*/relatedaccountgroups/*}/me" - + "mberships\022\262\002\n$SearchRelatedAccountGroupM" - + "emberships\022P.google.cloud.recaptchaenter" - + "prise.v1.SearchRelatedAccountGroupMember" - + "shipsRequest\032Q.google.cloud.recaptchaent" - + "erprise.v1.SearchRelatedAccountGroupMemb" - + "ershipsResponse\"e\332A\031project,hashed_accou" - + "nt_id\202\323\344\223\002C\">/v1/{project=projects/*}/re" - + "latedaccountgroupmemberships:search:\001*\032V" - + "\312A\"recaptchaenterprise.googleapis.com\322A." - + "https://www.googleapis.com/auth/cloud-pl" - + "atformB\231\002\n!com.google.recaptchaenterpris" - + "e.v1B\030RecaptchaEnterpriseProtoP\001Z\\cloud." - + "google.com/go/recaptchaenterprise/v2/api" - + "v1/recaptchaenterprisepb;recaptchaenterp" - + "risepb\242\002\004GCRE\252\002#Google.Cloud.RecaptchaEn" - + "terprise.V1\312\002#Google\\Cloud\\RecaptchaEnte" - + "rprise\\V1\352\002&Google::Cloud::RecaptchaEnte" - + "rprise::V1b\006proto3" + + "google/protobuf/timestamp.proto\032\027google/" + + "rpc/status.proto\"\252\001\n\027CreateAssessmentReq" + + "uest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+cloudreso" + + "urcemanager.googleapis.com/Project\022I\n\nas" + + "sessment\030\002 \001(\0132/.google.cloud.recaptchae" + + "nterprise.v1.AssessmentB\004\342A\001\002\"\226\005\n\020Transa" + + "ctionEvent\022d\n\nevent_type\030\001 \001(\0162J.google." + + "cloud.recaptchaenterprise.v1.Transaction" + + "Event.TransactionEventTypeB\004\342A\001\001\022\024\n\006reas" + + "on\030\002 \001(\tB\004\342A\001\001\022\023\n\005value\030\003 \001(\001B\004\342A\001\001\0224\n\ne" + + "vent_time\030\004 \001(\0132\032.google.protobuf.Timest" + + "ampB\004\342A\001\001\"\272\003\n\024TransactionEventType\022&\n\"TR" + + "ANSACTION_EVENT_TYPE_UNSPECIFIED\020\000\022\024\n\020ME" + + "RCHANT_APPROVE\020\001\022\021\n\rMERCHANT_DENY\020\002\022\021\n\rM" + + "ANUAL_REVIEW\020\003\022\021\n\rAUTHORIZATION\020\004\022\031\n\025AUT" + + "HORIZATION_DECLINE\020\005\022\023\n\017PAYMENT_CAPTURE\020" + + "\006\022\033\n\027PAYMENT_CAPTURE_DECLINE\020\007\022\n\n\006CANCEL" + + "\020\010\022\026\n\022CHARGEBACK_INQUIRY\020\t\022\024\n\020CHARGEBACK" + + "_ALERT\020\n\022\026\n\022FRAUD_NOTIFICATION\020\013\022\016\n\nCHAR" + + "GEBACK\020\014\022\034\n\030CHARGEBACK_REPRESENTMENT\020\r\022\026" + + "\n\022CHARGEBACK_REVERSE\020\016\022\022\n\016REFUND_REQUEST" + + "\020\017\022\022\n\016REFUND_DECLINE\020\020\022\n\n\006REFUND\020\021\022\022\n\016RE" + + "FUND_REVERSE\020\022\"\357\006\n\031AnnotateAssessmentReq" + + "uest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-recaptchaen" + + "terprise.googleapis.com/Assessment\022c\n\nan" + + "notation\030\002 \001(\0162I.google.cloud.recaptchae" + + "nterprise.v1.AnnotateAssessmentRequest.A" + + "nnotationB\004\342A\001\001\022\\\n\007reasons\030\003 \003(\0162E.googl" + + "e.cloud.recaptchaenterprise.v1.AnnotateA" + + "ssessmentRequest.ReasonB\004\342A\001\001\022\037\n\021hashed_" + + "account_id\030\004 \001(\014B\004\342A\001\001\022V\n\021transaction_ev" + + "ent\030\005 \001(\01325.google.cloud.recaptchaenterp" + + "rise.v1.TransactionEventB\004\342A\001\001\"~\n\nAnnota" + + "tion\022\032\n\026ANNOTATION_UNSPECIFIED\020\000\022\016\n\nLEGI" + + "TIMATE\020\001\022\016\n\nFRAUDULENT\020\002\022\030\n\020PASSWORD_COR" + + "RECT\020\003\032\002\010\001\022\032\n\022PASSWORD_INCORRECT\020\004\032\002\010\001\"\317" + + "\002\n\006Reason\022\026\n\022REASON_UNSPECIFIED\020\000\022\016\n\nCHA" + + "RGEBACK\020\001\022\024\n\020CHARGEBACK_FRAUD\020\010\022\026\n\022CHARG" + + "EBACK_DISPUTE\020\t\022\n\n\006REFUND\020\n\022\020\n\014REFUND_FR" + + "AUD\020\013\022\030\n\024TRANSACTION_ACCEPTED\020\014\022\030\n\024TRANS" + + "ACTION_DECLINED\020\r\022\026\n\022PAYMENT_HEURISTICS\020" + + "\002\022\030\n\024INITIATED_TWO_FACTOR\020\007\022\025\n\021PASSED_TW" + + "O_FACTOR\020\003\022\025\n\021FAILED_TWO_FACTOR\020\004\022\024\n\020COR" + + "RECT_PASSWORD\020\005\022\026\n\022INCORRECT_PASSWORD\020\006\022" + + "\017\n\013SOCIAL_SPAM\020\016\"\034\n\032AnnotateAssessmentRe" + + "sponse\"\266\001\n\030EndpointVerificationInfo\022\027\n\re" + + "mail_address\030\001 \001(\tH\000\022\026\n\014phone_number\030\002 \001" + + "(\tH\000\022\033\n\rrequest_token\030\003 \001(\tB\004\342A\001\003\022@\n\026las" + + "t_verification_time\030\004 \001(\0132\032.google.proto" + + "buf.TimestampB\004\342A\001\003B\n\n\010endpoint\"\322\004\n\027Acco" + + "untVerificationInfo\022P\n\tendpoints\030\001 \003(\0132=" + + ".google.cloud.recaptchaenterprise.v1.End" + + "pointVerificationInfo\022\025\n\rlanguage_code\030\003" + + " \001(\t\022m\n\032latest_verification_result\030\007 \001(\016" + + "2C.google.cloud.recaptchaenterprise.v1.A" + + "ccountVerificationInfo.ResultB\004\342A\001\003\022\024\n\010u" + + "sername\030\002 \001(\tB\002\030\001\"\310\002\n\006Result\022\026\n\022RESULT_U" + + "NSPECIFIED\020\000\022\031\n\025SUCCESS_USER_VERIFIED\020\001\022" + + "\033\n\027ERROR_USER_NOT_VERIFIED\020\002\022$\n ERROR_SI" + + "TE_ONBOARDING_INCOMPLETE\020\003\022\037\n\033ERROR_RECI" + + "PIENT_NOT_ALLOWED\020\004\022)\n%ERROR_RECIPIENT_A" + + "BUSE_LIMIT_EXHAUSTED\020\005\022\033\n\027ERROR_CRITICAL" + + "_INTERNAL\020\006\022\"\n\036ERROR_CUSTOMER_QUOTA_EXHA" + + "USTED\020\007\022\037\n\033ERROR_VERIFICATION_BYPASSED\020\010" + + "\022\032\n\026ERROR_VERDICT_MISMATCH\020\t\"\320\001\n\037Private" + + "PasswordLeakVerification\022 \n\022lookup_hash_" + + "prefix\030\001 \001(\014B\004\342A\001\001\022-\n\037encrypted_user_cre" + + "dentials_hash\030\002 \001(\014B\004\342A\001\001\022+\n\035encrypted_l" + + "eak_match_prefixes\030\003 \003(\014B\004\342A\001\003\022/\n!reencr" + + "ypted_user_credentials_hash\030\004 \001(\014B\004\342A\001\003\"" + + "\255\007\n\nAssessment\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0229\n\005ev" + + "ent\030\002 \001(\0132*.google.cloud.recaptchaenterp" + + "rise.v1.Event\022N\n\rrisk_analysis\030\003 \001(\01321.g" + + "oogle.cloud.recaptchaenterprise.v1.RiskA" + + "nalysisB\004\342A\001\003\022T\n\020token_properties\030\004 \001(\0132" + + "4.google.cloud.recaptchaenterprise.v1.To" + + "kenPropertiesB\004\342A\001\003\022Z\n\024account_verificat" + + "ion\030\005 \001(\0132<.google.cloud.recaptchaenterp" + + "rise.v1.AccountVerificationInfo\022c\n\033accou" + + "nt_defender_assessment\030\006 \001(\0132>.google.cl" + + "oud.recaptchaenterprise.v1.AccountDefend" + + "erAssessment\022p\n\"private_password_leak_ve" + + "rification\030\010 \001(\0132D.google.cloud.recaptch" + + "aenterprise.v1.PrivatePasswordLeakVerifi" + + "cation\022a\n\032firewall_policy_assessment\030\n \001" + + "(\0132=.google.cloud.recaptchaenterprise.v1" + + ".FirewallPolicyAssessment\022c\n\033fraud_preve" + + "ntion_assessment\030\013 \001(\0132>.google.cloud.re" + + "captchaenterprise.v1.FraudPreventionAsse" + + "ssment\022N\n\rfraud_signals\030\r \001(\01321.google.c" + + "loud.recaptchaenterprise.v1.FraudSignals" + + "B\004\342A\001\003:_\352A\\\n-recaptchaenterprise.googlea" + + "pis.com/Assessment\022+projects/{project}/a" + + "ssessments/{assessment}\"\257\003\n\005Event\022\023\n\005tok" + + "en\030\001 \001(\tB\004\342A\001\001\022\026\n\010site_key\030\002 \001(\tB\004\342A\001\001\022\030" + + "\n\nuser_agent\030\003 \001(\tB\004\342A\001\001\022\035\n\017user_ip_addr" + + "ess\030\004 \001(\tB\004\342A\001\001\022\035\n\017expected_action\030\005 \001(\t" + + "B\004\342A\001\001\022\037\n\021hashed_account_id\030\006 \001(\014B\004\342A\001\001\022" + + "\025\n\007express\030\016 \001(\010B\004\342A\001\001\022\033\n\rrequested_uri\030" + + "\010 \001(\tB\004\342A\001\001\022\"\n\024waf_token_assessment\030\t \001(" + + "\010B\004\342A\001\001\022\021\n\003ja3\030\n \001(\tB\004\342A\001\001\022\025\n\007headers\030\013 " + + "\003(\tB\004\342A\001\001\022(\n\032firewall_policy_evaluation\030" + + "\014 \001(\010B\004\342A\001\001\022T\n\020transaction_data\030\r \001(\01324." + + "google.cloud.recaptchaenterprise.v1.Tran" + + "sactionDataB\004\342A\001\001\"\377\010\n\017TransactionData\022\033\n" + + "\016transaction_id\030\013 \001(\tH\000\210\001\001\022\026\n\016payment_me" + + "thod\030\001 \001(\t\022\020\n\010card_bin\030\002 \001(\t\022\026\n\016card_las" + + "t_four\030\003 \001(\t\022\025\n\rcurrency_code\030\004 \001(\t\022\r\n\005v" + + "alue\030\005 \001(\001\022\026\n\016shipping_value\030\014 \001(\001\022V\n\020sh" + + "ipping_address\030\006 \001(\0132<.google.cloud.reca" + + "ptchaenterprise.v1.TransactionData.Addre" + + "ss\022U\n\017billing_address\030\007 \001(\0132<.google.clo" + + "ud.recaptchaenterprise.v1.TransactionDat" + + "a.Address\022G\n\004user\030\010 \001(\01329.google.cloud.r" + + "ecaptchaenterprise.v1.TransactionData.Us" + + "er\022L\n\tmerchants\030\r \003(\01329.google.cloud.rec" + + "aptchaenterprise.v1.TransactionData.User" + + "\022H\n\005items\030\016 \003(\01329.google.cloud.recaptcha" + + "enterprise.v1.TransactionData.Item\022V\n\014ga" + + "teway_info\030\n \001(\0132@.google.cloud.recaptch" + + "aenterprise.v1.TransactionData.GatewayIn" + + "fo\032\206\001\n\007Address\022\021\n\trecipient\030\001 \001(\t\022\017\n\007add" + + "ress\030\002 \003(\t\022\020\n\010locality\030\003 \001(\t\022\033\n\023administ" + + "rative_area\030\004 \001(\t\022\023\n\013region_code\030\005 \001(\t\022\023" + + "\n\013postal_code\030\006 \001(\t\032\204\001\n\004User\022\022\n\naccount_" + + "id\030\006 \001(\t\022\023\n\013creation_ms\030\001 \001(\003\022\r\n\005email\030\002" + + " \001(\t\022\026\n\016email_verified\030\003 \001(\010\022\024\n\014phone_nu" + + "mber\030\004 \001(\t\022\026\n\016phone_verified\030\005 \001(\010\032R\n\004It" + + "em\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\001\022\020\n\010quant" + + "ity\030\003 \001(\003\022\033\n\023merchant_account_id\030\004 \001(\t\032p" + + "\n\013GatewayInfo\022\014\n\004name\030\001 \001(\t\022\035\n\025gateway_r" + + "esponse_code\030\002 \001(\t\022\031\n\021avs_response_code\030" + + "\003 \001(\t\022\031\n\021cvv_response_code\030\004 \001(\tB\021\n\017_tra" + + "nsaction_id\"\204\003\n\014RiskAnalysis\022\r\n\005score\030\001 " + + "\001(\002\022W\n\007reasons\030\002 \003(\0162F.google.cloud.reca" + + "ptchaenterprise.v1.RiskAnalysis.Classifi" + + "cationReason\022 \n\030extended_verdict_reasons" + + "\030\003 \003(\t\"\351\001\n\024ClassificationReason\022%\n!CLASS" + + "IFICATION_REASON_UNSPECIFIED\020\000\022\016\n\nAUTOMA" + + "TION\020\001\022\032\n\026UNEXPECTED_ENVIRONMENT\020\002\022\024\n\020TO" + + "O_MUCH_TRAFFIC\020\003\022\035\n\031UNEXPECTED_USAGE_PAT" + + "TERNS\020\004\022\030\n\024LOW_CONFIDENCE_SCORE\020\005\022\025\n\021SUS" + + "PECTED_CARDING\020\006\022\030\n\024SUSPECTED_CHARGEBACK" + + "\020\007\"\230\003\n\017TokenProperties\022\r\n\005valid\030\001 \001(\010\022Z\n" + + "\016invalid_reason\030\002 \001(\0162B.google.cloud.rec" + + "aptchaenterprise.v1.TokenProperties.Inva" + + "lidReason\022/\n\013create_time\030\003 \001(\0132\032.google." + + "protobuf.Timestamp\022\020\n\010hostname\030\004 \001(\t\022\034\n\024" + + "android_package_name\030\010 \001(\t\022\025\n\rios_bundle" + + "_id\030\t \001(\t\022\016\n\006action\030\005 \001(\t\"\221\001\n\rInvalidRea" + + "son\022\036\n\032INVALID_REASON_UNSPECIFIED\020\000\022\032\n\026U" + + "NKNOWN_INVALID_REASON\020\001\022\r\n\tMALFORMED\020\002\022\013" + + "\n\007EXPIRED\020\003\022\010\n\004DUPE\020\004\022\013\n\007MISSING\020\005\022\021\n\rBR" + + "OWSER_ERROR\020\006\"\220\004\n\031FraudPreventionAssessm" + + "ent\022\030\n\020transaction_risk\030\001 \001(\002\022y\n\031stolen_" + + "instrument_verdict\030\002 \001(\0132V.google.cloud." + + "recaptchaenterprise.v1.FraudPreventionAs" + + "sessment.StolenInstrumentVerdict\022o\n\024card" + + "_testing_verdict\030\003 \001(\0132Q.google.cloud.re" + + "captchaenterprise.v1.FraudPreventionAsse" + + "ssment.CardTestingVerdict\022w\n\030behavioral_" + + "trust_verdict\030\004 \001(\0132U.google.cloud.recap" + + "tchaenterprise.v1.FraudPreventionAssessm" + + "ent.BehavioralTrustVerdict\032\'\n\027StolenInst" + + "rumentVerdict\022\014\n\004risk\030\001 \001(\002\032\"\n\022CardTesti" + + "ngVerdict\022\014\n\004risk\030\001 \001(\002\032\'\n\026BehavioralTru" + + "stVerdict\022\r\n\005trust\030\001 \001(\002\"\350\003\n\014FraudSignal" + + "s\022Y\n\014user_signals\030\001 \001(\0132=.google.cloud.r" + + "ecaptchaenterprise.v1.FraudSignals.UserS" + + "ignalsB\004\342A\001\003\022Y\n\014card_signals\030\002 \001(\0132=.goo" + + "gle.cloud.recaptchaenterprise.v1.FraudSi" + + "gnals.CardSignalsB\004\342A\001\003\032R\n\013UserSignals\022%" + + "\n\027active_days_lower_bound\030\001 \001(\005B\004\342A\001\003\022\034\n" + + "\016synthetic_risk\030\002 \001(\002B\004\342A\001\003\032\315\001\n\013CardSign" + + "als\022b\n\013card_labels\030\001 \003(\0162G.google.cloud." + + "recaptchaenterprise.v1.FraudSignals.Card" + + "Signals.CardLabelB\004\342A\001\003\"Z\n\tCardLabel\022\032\n\026" + + "CARD_LABEL_UNSPECIFIED\020\000\022\013\n\007PREPAID\020\001\022\013\n" + + "\007VIRTUAL\020\002\022\027\n\023UNEXPECTED_LOCATION\020\003\"\266\002\n\031" + + "AccountDefenderAssessment\022c\n\006labels\030\001 \003(" + + "\0162S.google.cloud.recaptchaenterprise.v1." + + "AccountDefenderAssessment.AccountDefende" + + "rLabel\"\263\001\n\024AccountDefenderLabel\022&\n\"ACCOU" + + "NT_DEFENDER_LABEL_UNSPECIFIED\020\000\022\021\n\rPROFI" + + "LE_MATCH\020\001\022\035\n\031SUSPICIOUS_LOGIN_ACTIVITY\020" + + "\002\022\037\n\033SUSPICIOUS_ACCOUNT_CREATION\020\003\022 \n\034RE" + + "LATED_ACCOUNTS_NUMBER_HIGH\020\004\"\225\001\n\020CreateK" + + "eyRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+clou" + + "dresourcemanager.googleapis.com/Project\022" + + ";\n\003key\030\002 \001(\0132(.google.cloud.recaptchaent" + + "erprise.v1.KeyB\004\342A\001\002\"\212\001\n\017ListKeysRequest" + + "\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+cloudresource" + + "manager.googleapis.com/Project\022\027\n\tpage_s" + + "ize\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001" + + "\001\"c\n\020ListKeysResponse\0226\n\004keys\030\001 \003(\0132(.go" + + "ogle.cloud.recaptchaenterprise.v1.Key\022\027\n" + + "\017next_page_token\030\002 \001(\t\"^\n\036RetrieveLegacy" + + "SecretKeyRequest\022<\n\003key\030\001 \001(\tB/\342A\001\002\372A(\n&" + + "recaptchaenterprise.googleapis.com/Key\"N" + + "\n\rGetKeyRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&" + + "recaptchaenterprise.googleapis.com/Key\"\206" + + "\001\n\020UpdateKeyRequest\022;\n\003key\030\001 \001(\0132(.googl" + + "e.cloud.recaptchaenterprise.v1.KeyB\004\342A\001\002" + + "\0225\n\013update_mask\030\002 \001(\0132\032.google.protobuf." + + "FieldMaskB\004\342A\001\001\"Q\n\020DeleteKeyRequest\022=\n\004n" + + "ame\030\001 \001(\tB/\342A\001\002\372A(\n&recaptchaenterprise." + + "googleapis.com/Key\"\267\001\n\033CreateFirewallPol" + + "icyRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+clo" + + "udresourcemanager.googleapis.com/Project" + + "\022R\n\017firewall_policy\030\002 \001(\01323.google.cloud" + + ".recaptchaenterprise.v1.FirewallPolicyB\004" + + "\342A\001\002\"\226\001\n\033ListFirewallPoliciesRequest\022D\n\006" + + "parent\030\001 \001(\tB4\342A\001\002\372A-\n+cloudresourcemana" + + "ger.googleapis.com/Project\022\027\n\tpage_size\030" + + "\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\"\207\001" + + "\n\034ListFirewallPoliciesResponse\022N\n\021firewa" + + "ll_policies\030\001 \003(\01323.google.cloud.recaptc" + + "haenterprise.v1.FirewallPolicy\022\027\n\017next_p" + + "age_token\030\002 \001(\t\"d\n\030GetFirewallPolicyRequ" + + "est\022H\n\004name\030\001 \001(\tB:\342A\001\002\372A3\n1recaptchaent" + + "erprise.googleapis.com/FirewallPolicy\"\250\001" + + "\n\033UpdateFirewallPolicyRequest\022R\n\017firewal" + + "l_policy\030\001 \001(\01323.google.cloud.recaptchae" + + "nterprise.v1.FirewallPolicyB\004\342A\001\002\0225\n\013upd" + + "ate_mask\030\002 \001(\0132\032.google.protobuf.FieldMa" + + "skB\004\342A\001\001\"g\n\033DeleteFirewallPolicyRequest\022" + + "H\n\004name\030\001 \001(\tB:\342A\001\002\372A3\n1recaptchaenterpr" + + "ise.googleapis.com/FirewallPolicy\"t\n\021Mig" + + "rateKeyRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&r" + + "ecaptchaenterprise.googleapis.com/Key\022 \n" + + "\022skip_billing_check\030\002 \001(\010B\004\342A\001\001\"V\n\021GetMe" + + "tricsRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*rec" + + "aptchaenterprise.googleapis.com/Metrics\"" + + "\301\002\n\007Metrics\022\022\n\004name\030\004 \001(\tB\004\342A\001\003\022.\n\nstart" + + "_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022" + + "H\n\rscore_metrics\030\002 \003(\01321.google.cloud.re" + + "captchaenterprise.v1.ScoreMetrics\022P\n\021cha" + + "llenge_metrics\030\003 \003(\01325.google.cloud.reca" + + "ptchaenterprise.v1.ChallengeMetrics:V\352AS" + + "\n*recaptchaenterprise.googleapis.com/Met" + + "rics\022%projects/{project}/keys/{key}/metr" + + "ics\"<\n\037RetrieveLegacySecretKeyResponse\022\031" + + "\n\021legacy_secret_key\030\001 \001(\t\"\273\005\n\003Key\022\014\n\004nam" + + "e\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022K\n\014web_set" + + "tings\030\003 \001(\01323.google.cloud.recaptchaente" + + "rprise.v1.WebKeySettingsH\000\022S\n\020android_se" + + "ttings\030\004 \001(\01327.google.cloud.recaptchaent" + + "erprise.v1.AndroidKeySettingsH\000\022K\n\014ios_s" + + "ettings\030\005 \001(\01323.google.cloud.recaptchaen" + + "terprise.v1.IOSKeySettingsH\000\022D\n\006labels\030\006" + + " \003(\01324.google.cloud.recaptchaenterprise." + + "v1.Key.LabelsEntry\0225\n\013create_time\030\007 \001(\0132" + + "\032.google.protobuf.TimestampB\004\342A\001\003\022L\n\017tes" + + "ting_options\030\t \001(\01323.google.cloud.recapt" + + "chaenterprise.v1.TestingOptions\022F\n\014waf_s" + + "ettings\030\n \001(\01320.google.cloud.recaptchaen" + + "terprise.v1.WafSettings\032-\n\013LabelsEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:J\352AG\n&rec" + + "aptchaenterprise.googleapis.com/Key\022\035pro" + + "jects/{project}/keys/{key}B\023\n\021platform_s" + + "ettings\"\350\001\n\016TestingOptions\022\025\n\rtesting_sc" + + "ore\030\001 \001(\002\022_\n\021testing_challenge\030\002 \001(\0162D.g" + + "oogle.cloud.recaptchaenterprise.v1.Testi" + + "ngOptions.TestingChallenge\"^\n\020TestingCha" + + "llenge\022!\n\035TESTING_CHALLENGE_UNSPECIFIED\020" + + "\000\022\r\n\tNOCAPTCHA\020\001\022\030\n\024UNSOLVABLE_CHALLENGE" + + "\020\002\"\221\004\n\016WebKeySettings\022\031\n\021allow_all_domai" + + "ns\030\003 \001(\010\022\027\n\017allowed_domains\030\001 \003(\t\022\031\n\021all" + + "ow_amp_traffic\030\002 \001(\010\022c\n\020integration_type" + + "\030\004 \001(\0162C.google.cloud.recaptchaenterpris" + + "e.v1.WebKeySettings.IntegrationTypeB\004\342A\001" + + "\002\022v\n\035challenge_security_preference\030\005 \001(\016" + + "2O.google.cloud.recaptchaenterprise.v1.W" + + "ebKeySettings.ChallengeSecurityPreferenc" + + "e\"[\n\017IntegrationType\022 \n\034INTEGRATION_TYPE" + + "_UNSPECIFIED\020\000\022\t\n\005SCORE\020\001\022\014\n\010CHECKBOX\020\002\022" + + "\r\n\tINVISIBLE\020\003\"v\n\033ChallengeSecurityPrefe" + + "rence\022-\n)CHALLENGE_SECURITY_PREFERENCE_U" + + "NSPECIFIED\020\000\022\r\n\tUSABILITY\020\001\022\013\n\007BALANCE\020\002" + + "\022\014\n\010SECURITY\020\003\"\207\001\n\022AndroidKeySettings\022\037\n" + + "\027allow_all_package_names\030\002 \001(\010\022\035\n\025allowe" + + "d_package_names\030\001 \003(\t\0221\n)support_non_goo" + + "gle_app_store_distribution\030\003 \001(\010\"\235\001\n\016IOS" + + "KeySettings\022\034\n\024allow_all_bundle_ids\030\002 \001(" + + "\010\022\032\n\022allowed_bundle_ids\030\001 \003(\t\022Q\n\022apple_d" + + "eveloper_id\030\003 \001(\01325.google.cloud.recaptc" + + "haenterprise.v1.AppleDeveloperId\"[\n\020Appl" + + "eDeveloperId\022\032\n\013private_key\030\001 \001(\tB\005\342A\002\002\004" + + "\022\024\n\006key_id\030\002 \001(\tB\004\342A\001\002\022\025\n\007team_id\030\003 \001(\tB" + + "\004\342A\001\002\"\251\001\n\021ScoreDistribution\022_\n\rscore_buc" + + "kets\030\001 \003(\0132H.google.cloud.recaptchaenter" + + "prise.v1.ScoreDistribution.ScoreBucketsE" + + "ntry\0323\n\021ScoreBucketsEntry\022\013\n\003key\030\001 \001(\005\022\r" + + "\n\005value\030\002 \001(\003:\0028\001\"\253\002\n\014ScoreMetrics\022O\n\017ov" + + "erall_metrics\030\001 \001(\01326.google.cloud.recap" + + "tchaenterprise.v1.ScoreDistribution\022\\\n\016a" + + "ction_metrics\030\002 \003(\0132D.google.cloud.recap" + + "tchaenterprise.v1.ScoreMetrics.ActionMet" + + "ricsEntry\032l\n\022ActionMetricsEntry\022\013\n\003key\030\001" + + " \001(\t\022E\n\005value\030\002 \001(\01326.google.cloud.recap" + + "tchaenterprise.v1.ScoreDistribution:\0028\001\"" + + "o\n\020ChallengeMetrics\022\026\n\016pageload_count\030\001 " + + "\001(\003\022\027\n\017nocaptcha_count\030\002 \001(\003\022\024\n\014failed_c" + + "ount\030\003 \001(\003\022\024\n\014passed_count\030\004 \001(\003\"\221\001\n\030Fir" + + "ewallPolicyAssessment\022!\n\005error\030\005 \001(\0132\022.g" + + "oogle.rpc.Status\022R\n\017firewall_policy\030\010 \001(" + + "\01323.google.cloud.recaptchaenterprise.v1." + + "FirewallPolicyB\004\342A\001\003\"\335\004\n\016FirewallAction\022" + + "P\n\005allow\030\001 \001(\0132?.google.cloud.recaptchae" + + "nterprise.v1.FirewallAction.AllowActionH" + + "\000\022P\n\005block\030\002 \001(\0132?.google.cloud.recaptch" + + "aenterprise.v1.FirewallAction.BlockActio" + + "nH\000\022V\n\010redirect\030\005 \001(\0132B.google.cloud.rec" + + "aptchaenterprise.v1.FirewallAction.Redir" + + "ectActionH\000\022Z\n\nsubstitute\030\003 \001(\0132D.google" + + ".cloud.recaptchaenterprise.v1.FirewallAc" + + "tion.SubstituteActionH\000\022Y\n\nset_header\030\004 " + + "\001(\0132C.google.cloud.recaptchaenterprise.v" + + "1.FirewallAction.SetHeaderActionH\000\032\r\n\013Al" + + "lowAction\032\r\n\013BlockAction\032\020\n\016RedirectActi" + + "on\032 \n\020SubstituteAction\022\014\n\004path\030\001 \001(\t\032-\n\017" + + "SetHeaderAction\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\tB\027\n\025firewall_action_oneof\"\210\002\n\016Firewal" + + "lPolicy\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001" + + "(\t\022\014\n\004path\030\004 \001(\t\022\021\n\tcondition\030\005 \001(\t\022D\n\007a" + + "ctions\030\006 \003(\01323.google.cloud.recaptchaent" + + "erprise.v1.FirewallAction:l\352Ai\n1recaptch" + + "aenterprise.googleapis.com/FirewallPolic" + + "y\0224projects/{project}/firewallpolicies/{" + + "firewallpolicy}\"\271\001\n)ListRelatedAccountGr" + + "oupMembershipsRequest\022Y\n\006parent\030\001 \001(\tBI\342" + + "A\001\002\372AB\022@recaptchaenterprise.googleapis.c" + + "om/RelatedAccountGroupMembership\022\027\n\tpage" + + "_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342" + + "A\001\001\"\264\001\n*ListRelatedAccountGroupMembershi" + + "psResponse\022m\n!related_account_group_memb" + + "erships\030\001 \003(\0132B.google.cloud.recaptchaen" + + "terprise.v1.RelatedAccountGroupMembershi" + + "p\022\027\n\017next_page_token\030\002 \001(\t\"\245\001\n\037ListRelat" + + "edAccountGroupsRequest\022O\n\006parent\030\001 \001(\tB?" + + "\342A\001\002\372A8\0226recaptchaenterprise.googleapis." + + "com/RelatedAccountGroup\022\027\n\tpage_size\030\002 \001" + + "(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\"\225\001\n L" + + "istRelatedAccountGroupsResponse\022X\n\026relat" + + "ed_account_groups\030\001 \003(\01328.google.cloud.r" + + "ecaptchaenterprise.v1.RelatedAccountGrou" + + "p\022\027\n\017next_page_token\030\002 \001(\t\"\335\001\n+SearchRel" + + "atedAccountGroupMembershipsRequest\022Z\n\007pr" + + "oject\030\001 \001(\tBI\342A\001\002\372AB\022@recaptchaenterpris" + + "e.googleapis.com/RelatedAccountGroupMemb" + + "ership\022\037\n\021hashed_account_id\030\002 \001(\014B\004\342A\001\001\022" + + "\027\n\tpage_size\030\003 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\004" + + " \001(\tB\004\342A\001\001\"\266\001\n,SearchRelatedAccountGroup" + + "MembershipsResponse\022m\n!related_account_g" + + "roup_memberships\030\001 \003(\0132B.google.cloud.re" + + "captchaenterprise.v1.RelatedAccountGroup" + + "Membership\022\027\n\017next_page_token\030\002 \001(\t\"\264\002\n\035" + + "RelatedAccountGroupMembership\022W\n\004name\030\001 " + + "\001(\tBI\342A\001\002\372AB\n@recaptchaenterprise.google" + + "apis.com/RelatedAccountGroupMembership\022\031" + + "\n\021hashed_account_id\030\002 \001(\014:\236\001\352A\232\001\n@recapt" + + "chaenterprise.googleapis.com/RelatedAcco" + + "untGroupMembership\022Vprojects/{project}/r" + + "elatedaccountgroups/{relatedaccountgroup" + + "}/memberships/{membership}\"\340\001\n\023RelatedAc" + + "countGroup\022M\n\004name\030\001 \001(\tB?\342A\001\002\372A8\n6recap" + + "tchaenterprise.googleapis.com/RelatedAcc" + + "ountGroup:z\352Aw\n6recaptchaenterprise.goog" + + "leapis.com/RelatedAccountGroup\022=projects" + + "/{project}/relatedaccountgroups/{related" + + "accountgroup}\"\355\002\n\013WafSettings\022V\n\013waf_ser" + + "vice\030\001 \001(\0162;.google.cloud.recaptchaenter" + + "prise.v1.WafSettings.WafServiceB\004\342A\001\002\022V\n" + + "\013waf_feature\030\002 \001(\0162;.google.cloud.recapt" + + "chaenterprise.v1.WafSettings.WafFeatureB" + + "\004\342A\001\002\"o\n\nWafFeature\022\033\n\027WAF_FEATURE_UNSPE" + + "CIFIED\020\000\022\022\n\016CHALLENGE_PAGE\020\001\022\021\n\rSESSION_" + + "TOKEN\020\002\022\020\n\014ACTION_TOKEN\020\003\022\013\n\007EXPRESS\020\005\"=" + + "\n\nWafService\022\033\n\027WAF_SERVICE_UNSPECIFIED\020" + + "\000\022\006\n\002CA\020\001\022\n\n\006FASTLY\020\0032\346\035\n\032RecaptchaEnter" + + "priseService\022\316\001\n\020CreateAssessment\022<.goog" + + "le.cloud.recaptchaenterprise.v1.CreateAs" + + "sessmentRequest\032/.google.cloud.recaptcha" + + "enterprise.v1.Assessment\"K\332A\021parent,asse" + + "ssment\202\323\344\223\0021\"#/v1/{parent=projects/*}/as" + + "sessments:\nassessment\022\340\001\n\022AnnotateAssess" + + "ment\022>.google.cloud.recaptchaenterprise." + + "v1.AnnotateAssessmentRequest\032?.google.cl" + + "oud.recaptchaenterprise.v1.AnnotateAsses" + + "smentResponse\"I\332A\017name,annotation\202\323\344\223\0021\"" + + ",/v1/{name=projects/*/assessments/*}:ann" + + "otate:\001*\022\244\001\n\tCreateKey\0225.google.cloud.re" + + "captchaenterprise.v1.CreateKeyRequest\032(.", + "google.cloud.recaptchaenterprise.v1.Key\"" + + "6\332A\nparent,key\202\323\344\223\002#\"\034/v1/{parent=projec" + + "ts/*}/keys:\003key\022\246\001\n\010ListKeys\0224.google.cl" + + "oud.recaptchaenterprise.v1.ListKeysReque" + + "st\0325.google.cloud.recaptchaenterprise.v1" + + ".ListKeysResponse\"-\332A\006parent\202\323\344\223\002\036\022\034/v1/" + + "{parent=projects/*}/keys\022\347\001\n\027RetrieveLeg" + + "acySecretKey\022C.google.cloud.recaptchaent" + + "erprise.v1.RetrieveLegacySecretKeyReques" + + "t\032D.google.cloud.recaptchaenterprise.v1." + + "RetrieveLegacySecretKeyResponse\"A\332A\003key\202" + + "\323\344\223\0025\0223/v1/{key=projects/*/keys/*}:retri" + + "eveLegacySecretKey\022\223\001\n\006GetKey\0222.google.c" + + "loud.recaptchaenterprise.v1.GetKeyReques" + + "t\032(.google.cloud.recaptchaenterprise.v1." + + "Key\"+\332A\004name\202\323\344\223\002\036\022\034/v1/{name=projects/*" + + "/keys/*}\022\255\001\n\tUpdateKey\0225.google.cloud.re" + + "captchaenterprise.v1.UpdateKeyRequest\032(." + + "google.cloud.recaptchaenterprise.v1.Key\"" + + "?\332A\017key,update_mask\202\323\344\223\002\'2 /v1/{key.name" + + "=projects/*/keys/*}:\003key\022\207\001\n\tDeleteKey\0225" + + ".google.cloud.recaptchaenterprise.v1.Del" + + "eteKeyRequest\032\026.google.protobuf.Empty\"+\332" + + "A\004name\202\323\344\223\002\036*\034/v1/{name=projects/*/keys/" + + "*}\022\237\001\n\nMigrateKey\0226.google.cloud.recaptc" + + "haenterprise.v1.MigrateKeyRequest\032(.goog" + + "le.cloud.recaptchaenterprise.v1.Key\"/\202\323\344" + + "\223\002)\"$/v1/{name=projects/*/keys/*}:migrat" + + "e:\001*\022\247\001\n\nGetMetrics\0226.google.cloud.recap" + + "tchaenterprise.v1.GetMetricsRequest\032,.go" + + "ogle.cloud.recaptchaenterprise.v1.Metric" + + "s\"3\332A\004name\202\323\344\223\002&\022$/v1/{name=projects/*/k" + + "eys/*/metrics}\022\351\001\n\024CreateFirewallPolicy\022" + + "@.google.cloud.recaptchaenterprise.v1.Cr" + + "eateFirewallPolicyRequest\0323.google.cloud" + + ".recaptchaenterprise.v1.FirewallPolicy\"Z" + + "\332A\026parent,firewall_policy\202\323\344\223\002;\"(/v1/{pa" + + "rent=projects/*}/firewallpolicies:\017firew" + + "all_policy\022\326\001\n\024ListFirewallPolicies\022@.go" + + "ogle.cloud.recaptchaenterprise.v1.ListFi" + + "rewallPoliciesRequest\032A.google.cloud.rec" + + "aptchaenterprise.v1.ListFirewallPolicies" + + "Response\"9\332A\006parent\202\323\344\223\002*\022(/v1/{parent=p" + + "rojects/*}/firewallpolicies\022\300\001\n\021GetFirew" + + "allPolicy\022=.google.cloud.recaptchaenterp" + + "rise.v1.GetFirewallPolicyRequest\0323.googl" + + "e.cloud.recaptchaenterprise.v1.FirewallP" + + "olicy\"7\332A\004name\202\323\344\223\002*\022(/v1/{name=projects" + + "/*/firewallpolicies/*}\022\376\001\n\024UpdateFirewal" + + "lPolicy\022@.google.cloud.recaptchaenterpri" + + "se.v1.UpdateFirewallPolicyRequest\0323.goog" + + "le.cloud.recaptchaenterprise.v1.Firewall" + + "Policy\"o\332A\033firewall_policy,update_mask\202\323" + + "\344\223\002K28/v1/{firewall_policy.name=projects" + + "/*/firewallpolicies/*}:\017firewall_policy\022" + + "\251\001\n\024DeleteFirewallPolicy\022@.google.cloud." + + "recaptchaenterprise.v1.DeleteFirewallPol" + + "icyRequest\032\026.google.protobuf.Empty\"7\332A\004n" + + "ame\202\323\344\223\002**(/v1/{name=projects/*/firewall" + + "policies/*}\022\346\001\n\030ListRelatedAccountGroups" + + "\022D.google.cloud.recaptchaenterprise.v1.L" + + "istRelatedAccountGroupsRequest\032E.google." + + "cloud.recaptchaenterprise.v1.ListRelated" + + "AccountGroupsResponse\"=\332A\006parent\202\323\344\223\002.\022," + + "/v1/{parent=projects/*}/relatedaccountgr" + + "oups\022\222\002\n\"ListRelatedAccountGroupMembersh" + + "ips\022N.google.cloud.recaptchaenterprise.v" + + "1.ListRelatedAccountGroupMembershipsRequ" + + "est\032O.google.cloud.recaptchaenterprise.v" + + "1.ListRelatedAccountGroupMembershipsResp" + + "onse\"K\332A\006parent\202\323\344\223\002<\022:/v1/{parent=proje" + + "cts/*/relatedaccountgroups/*}/membership" + + "s\022\262\002\n$SearchRelatedAccountGroupMembershi" + + "ps\022P.google.cloud.recaptchaenterprise.v1" + + ".SearchRelatedAccountGroupMembershipsReq" + + "uest\032Q.google.cloud.recaptchaenterprise." + + "v1.SearchRelatedAccountGroupMembershipsR" + + "esponse\"e\332A\031project,hashed_account_id\202\323\344" + + "\223\002C\">/v1/{project=projects/*}/relatedacc" + + "ountgroupmemberships:search:\001*\032V\312A\"recap" + + "tchaenterprise.googleapis.com\322A.https://" + + "www.googleapis.com/auth/cloud-platformB\231" + + "\002\n!com.google.recaptchaenterprise.v1B\030Re" + + "captchaEnterpriseProtoP\001Z\\cloud.google.c" + + "om/go/recaptchaenterprise/v2/apiv1/recap" + + "tchaenterprisepb;recaptchaenterprisepb\242\002" + + "\004GCRE\252\002#Google.Cloud.RecaptchaEnterprise" + + ".V1\312\002#Google\\Cloud\\RecaptchaEnterprise\\V" + + "1\352\002&Google::Cloud::RecaptchaEnterprise::" + + "V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -635,6 +818,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_cloud_recaptchaenterprise_v1_CreateAssessmentRequest_descriptor = getDescriptor().getMessageTypes().get(0); @@ -706,7 +890,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AccountVerification", "AccountDefenderAssessment", "PrivatePasswordLeakVerification", + "FirewallPolicyAssessment", "FraudPreventionAssessment", + "FraudSignals", }); internal_static_google_cloud_recaptchaenterprise_v1_Event_descriptor = getDescriptor().getMessageTypes().get(8); @@ -720,6 +906,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UserIpAddress", "ExpectedAction", "HashedAccountId", + "Express", + "RequestedUri", + "WafTokenAssessment", + "Ja3", + "Headers", + "FirewallPolicyEvaluation", "TransactionData", }); internal_static_google_cloud_recaptchaenterprise_v1_TransactionData_descriptor = @@ -789,7 +981,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_RiskAnalysis_descriptor, new java.lang.String[] { - "Score", "Reasons", + "Score", "Reasons", "ExtendedVerdictReasons", }); internal_static_google_cloud_recaptchaenterprise_v1_TokenProperties_descriptor = getDescriptor().getMessageTypes().get(11); @@ -811,7 +1003,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_descriptor, new java.lang.String[] { - "TransactionRisk", "StolenInstrumentVerdict", "CardTestingVerdict", + "TransactionRisk", + "StolenInstrumentVerdict", + "CardTestingVerdict", + "BehavioralTrustVerdict", }); internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_StolenInstrumentVerdict_descriptor = internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_descriptor @@ -833,8 +1028,46 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Risk", }); - internal_static_google_cloud_recaptchaenterprise_v1_AccountDefenderAssessment_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor, + new java.lang.String[] { + "Trust", + }); + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_descriptor = getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_descriptor, + new java.lang.String[] { + "UserSignals", "CardSignals", + }); + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_UserSignals_descriptor, + new java.lang.String[] { + "ActiveDaysLowerBound", "SyntheticRisk", + }); + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FraudSignals_CardSignals_descriptor, + new java.lang.String[] { + "CardLabels", + }); + internal_static_google_cloud_recaptchaenterprise_v1_AccountDefenderAssessment_descriptor = + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_recaptchaenterprise_v1_AccountDefenderAssessment_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_AccountDefenderAssessment_descriptor, @@ -842,7 +1075,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Labels", }); internal_static_google_cloud_recaptchaenterprise_v1_CreateKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_recaptchaenterprise_v1_CreateKeyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_CreateKeyRequest_descriptor, @@ -850,7 +1083,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Key", }); internal_static_google_cloud_recaptchaenterprise_v1_ListKeysRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_recaptchaenterprise_v1_ListKeysRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_ListKeysRequest_descriptor, @@ -858,7 +1091,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_recaptchaenterprise_v1_ListKeysResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_recaptchaenterprise_v1_ListKeysResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_ListKeysResponse_descriptor, @@ -866,7 +1099,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Keys", "NextPageToken", }); internal_static_google_cloud_recaptchaenterprise_v1_RetrieveLegacySecretKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_recaptchaenterprise_v1_RetrieveLegacySecretKeyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_RetrieveLegacySecretKeyRequest_descriptor, @@ -874,7 +1107,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", }); internal_static_google_cloud_recaptchaenterprise_v1_GetKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_recaptchaenterprise_v1_GetKeyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_GetKeyRequest_descriptor, @@ -882,7 +1115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_recaptchaenterprise_v1_UpdateKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_recaptchaenterprise_v1_UpdateKeyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_UpdateKeyRequest_descriptor, @@ -890,15 +1123,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "UpdateMask", }); internal_static_google_cloud_recaptchaenterprise_v1_DeleteKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_recaptchaenterprise_v1_DeleteKeyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_DeleteKeyRequest_descriptor, new java.lang.String[] { "Name", }); + internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_CreateFirewallPolicyRequest_descriptor, + new java.lang.String[] { + "Parent", "FirewallPolicy", + }); + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_ListFirewallPoliciesResponse_descriptor, + new java.lang.String[] { + "FirewallPolicies", "NextPageToken", + }); + internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_GetFirewallPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_descriptor, + new java.lang.String[] { + "FirewallPolicy", "UpdateMask", + }); + internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_DeleteFirewallPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); internal_static_google_cloud_recaptchaenterprise_v1_MigrateKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_recaptchaenterprise_v1_MigrateKeyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_MigrateKeyRequest_descriptor, @@ -906,7 +1187,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "SkipBillingCheck", }); internal_static_google_cloud_recaptchaenterprise_v1_GetMetricsRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_recaptchaenterprise_v1_GetMetricsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_GetMetricsRequest_descriptor, @@ -914,7 +1195,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_recaptchaenterprise_v1_Metrics_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_recaptchaenterprise_v1_Metrics_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_Metrics_descriptor, @@ -922,7 +1203,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "StartTime", "ScoreMetrics", "ChallengeMetrics", }); internal_static_google_cloud_recaptchaenterprise_v1_RetrieveLegacySecretKeyResponse_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_recaptchaenterprise_v1_RetrieveLegacySecretKeyResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_RetrieveLegacySecretKeyResponse_descriptor, @@ -930,7 +1211,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LegacySecretKey", }); internal_static_google_cloud_recaptchaenterprise_v1_Key_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_recaptchaenterprise_v1_Key_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_Key_descriptor, @@ -955,7 +1236,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_recaptchaenterprise_v1_TestingOptions_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_recaptchaenterprise_v1_TestingOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_TestingOptions_descriptor, @@ -963,7 +1244,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TestingScore", "TestingChallenge", }); internal_static_google_cloud_recaptchaenterprise_v1_WebKeySettings_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_recaptchaenterprise_v1_WebKeySettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_WebKeySettings_descriptor, @@ -975,23 +1256,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ChallengeSecurityPreference", }); internal_static_google_cloud_recaptchaenterprise_v1_AndroidKeySettings_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_recaptchaenterprise_v1_AndroidKeySettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_AndroidKeySettings_descriptor, new java.lang.String[] { - "AllowAllPackageNames", "AllowedPackageNames", + "AllowAllPackageNames", "AllowedPackageNames", "SupportNonGoogleAppStoreDistribution", }); internal_static_google_cloud_recaptchaenterprise_v1_IOSKeySettings_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_recaptchaenterprise_v1_IOSKeySettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_IOSKeySettings_descriptor, new java.lang.String[] { - "AllowAllBundleIds", "AllowedBundleIds", + "AllowAllBundleIds", "AllowedBundleIds", "AppleDeveloperId", + }); + internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_AppleDeveloperId_descriptor, + new java.lang.String[] { + "PrivateKey", "KeyId", "TeamId", }); internal_static_google_cloud_recaptchaenterprise_v1_ScoreDistribution_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(38); internal_static_google_cloud_recaptchaenterprise_v1_ScoreDistribution_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_ScoreDistribution_descriptor, @@ -1009,7 +1298,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_recaptchaenterprise_v1_ScoreMetrics_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(39); internal_static_google_cloud_recaptchaenterprise_v1_ScoreMetrics_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_ScoreMetrics_descriptor, @@ -1027,15 +1316,83 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_recaptchaenterprise_v1_ChallengeMetrics_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(40); internal_static_google_cloud_recaptchaenterprise_v1_ChallengeMetrics_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_ChallengeMetrics_descriptor, new java.lang.String[] { "PageloadCount", "NocaptchaCount", "FailedCount", "PassedCount", }); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicyAssessment_descriptor, + new java.lang.String[] { + "Error", "FirewallPolicy", + }); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor, + new java.lang.String[] { + "Allow", "Block", "Redirect", "Substitute", "SetHeader", "FirewallActionOneof", + }); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_AllowAction_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_BlockAction_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_RedirectAction_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SubstituteAction_descriptor, + new java.lang.String[] { + "Path", + }); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FirewallAction_SetHeaderAction_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1_FirewallPolicy_descriptor, + new java.lang.String[] { + "Name", "Description", "Path", "Condition", "Actions", + }); internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupMembershipsRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(44); internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupMembershipsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupMembershipsRequest_descriptor, @@ -1043,7 +1400,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupMembershipsResponse_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(45); internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupMembershipsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupMembershipsResponse_descriptor, @@ -1051,7 +1408,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RelatedAccountGroupMemberships", "NextPageToken", }); internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupsRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(46); internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupsRequest_descriptor, @@ -1059,7 +1416,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupsResponse_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(47); internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_ListRelatedAccountGroupsResponse_descriptor, @@ -1067,7 +1424,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RelatedAccountGroups", "NextPageToken", }); internal_static_google_cloud_recaptchaenterprise_v1_SearchRelatedAccountGroupMembershipsRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(48); internal_static_google_cloud_recaptchaenterprise_v1_SearchRelatedAccountGroupMembershipsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_SearchRelatedAccountGroupMembershipsRequest_descriptor, @@ -1075,7 +1432,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Project", "HashedAccountId", "PageSize", "PageToken", }); internal_static_google_cloud_recaptchaenterprise_v1_SearchRelatedAccountGroupMembershipsResponse_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(49); internal_static_google_cloud_recaptchaenterprise_v1_SearchRelatedAccountGroupMembershipsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_SearchRelatedAccountGroupMembershipsResponse_descriptor, @@ -1083,7 +1440,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RelatedAccountGroupMemberships", "NextPageToken", }); internal_static_google_cloud_recaptchaenterprise_v1_RelatedAccountGroupMembership_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(50); internal_static_google_cloud_recaptchaenterprise_v1_RelatedAccountGroupMembership_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_RelatedAccountGroupMembership_descriptor, @@ -1091,7 +1448,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "HashedAccountId", }); internal_static_google_cloud_recaptchaenterprise_v1_RelatedAccountGroup_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(51); internal_static_google_cloud_recaptchaenterprise_v1_RelatedAccountGroup_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_RelatedAccountGroup_descriptor, @@ -1099,7 +1456,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_recaptchaenterprise_v1_WafSettings_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(52); internal_static_google_cloud_recaptchaenterprise_v1_WafSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1_WafSettings_descriptor, @@ -1124,6 +1481,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RetrieveLegacySecretKeyRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RetrieveLegacySecretKeyRequest.java index 1fbaac314c25..5495517ceb6f 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RetrieveLegacySecretKeyRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RetrieveLegacySecretKeyRequest.java @@ -72,7 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The public key name linked to the requested secret key in the
-   * format "projects/{project}/keys/{key}".
+   * format `projects/{project}/keys/{key}`.
    * 
* * @@ -98,7 +98,7 @@ public java.lang.String getKey() { * *
    * Required. The public key name linked to the requested secret key in the
-   * format "projects/{project}/keys/{key}".
+   * format `projects/{project}/keys/{key}`.
    * 
* * @@ -473,7 +473,7 @@ public Builder mergeFrom( * *
      * Required. The public key name linked to the requested secret key in the
-     * format "projects/{project}/keys/{key}".
+     * format `projects/{project}/keys/{key}`.
      * 
* * @@ -498,7 +498,7 @@ public java.lang.String getKey() { * *
      * Required. The public key name linked to the requested secret key in the
-     * format "projects/{project}/keys/{key}".
+     * format `projects/{project}/keys/{key}`.
      * 
* * @@ -523,7 +523,7 @@ public com.google.protobuf.ByteString getKeyBytes() { * *
      * Required. The public key name linked to the requested secret key in the
-     * format "projects/{project}/keys/{key}".
+     * format `projects/{project}/keys/{key}`.
      * 
* * @@ -547,7 +547,7 @@ public Builder setKey(java.lang.String value) { * *
      * Required. The public key name linked to the requested secret key in the
-     * format "projects/{project}/keys/{key}".
+     * format `projects/{project}/keys/{key}`.
      * 
* * @@ -567,7 +567,7 @@ public Builder clearKey() { * *
      * Required. The public key name linked to the requested secret key in the
-     * format "projects/{project}/keys/{key}".
+     * format `projects/{project}/keys/{key}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RetrieveLegacySecretKeyRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RetrieveLegacySecretKeyRequestOrBuilder.java index 2ce4e1d5aeb1..b30390ab62ef 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RetrieveLegacySecretKeyRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RetrieveLegacySecretKeyRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface RetrieveLegacySecretKeyRequestOrBuilder * *
    * Required. The public key name linked to the requested secret key in the
-   * format "projects/{project}/keys/{key}".
+   * format `projects/{project}/keys/{key}`.
    * 
* * @@ -43,7 +43,7 @@ public interface RetrieveLegacySecretKeyRequestOrBuilder * *
    * Required. The public key name linked to the requested secret key in the
-   * format "projects/{project}/keys/{key}".
+   * format `projects/{project}/keys/{key}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RiskAnalysis.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RiskAnalysis.java index e7a350d04927..63510271eefb 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RiskAnalysis.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RiskAnalysis.java @@ -39,6 +39,7 @@ private RiskAnalysis(com.google.protobuf.GeneratedMessageV3.Builder builder) private RiskAnalysis() { reasons_ = java.util.Collections.emptyList(); + extendedVerdictReasons_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -470,6 +471,74 @@ public int getReasonsValue(int index) { private int reasonsMemoizedSerializedSize; + public static final int EXTENDED_VERDICT_REASONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList extendedVerdictReasons_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Extended verdict reasons to be used for experimentation only. The set of
+   * possible reasons is subject to change.
+   * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @return A list containing the extendedVerdictReasons. + */ + public com.google.protobuf.ProtocolStringList getExtendedVerdictReasonsList() { + return extendedVerdictReasons_; + } + /** + * + * + *
+   * Extended verdict reasons to be used for experimentation only. The set of
+   * possible reasons is subject to change.
+   * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @return The count of extendedVerdictReasons. + */ + public int getExtendedVerdictReasonsCount() { + return extendedVerdictReasons_.size(); + } + /** + * + * + *
+   * Extended verdict reasons to be used for experimentation only. The set of
+   * possible reasons is subject to change.
+   * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param index The index of the element to return. + * @return The extendedVerdictReasons at the given index. + */ + public java.lang.String getExtendedVerdictReasons(int index) { + return extendedVerdictReasons_.get(index); + } + /** + * + * + *
+   * Extended verdict reasons to be used for experimentation only. The set of
+   * possible reasons is subject to change.
+   * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param index The index of the value to return. + * @return The bytes of the extendedVerdictReasons at the given index. + */ + public com.google.protobuf.ByteString getExtendedVerdictReasonsBytes(int index) { + return extendedVerdictReasons_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -495,6 +564,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < reasons_.size(); i++) { output.writeEnumNoTag(reasons_.get(i)); } + for (int i = 0; i < extendedVerdictReasons_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, extendedVerdictReasons_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -519,6 +592,14 @@ public int getSerializedSize() { } reasonsMemoizedSerializedSize = dataSize; } + { + int dataSize = 0; + for (int i = 0; i < extendedVerdictReasons_.size(); i++) { + dataSize += computeStringSizeNoTag(extendedVerdictReasons_.getRaw(i)); + } + size += dataSize; + size += 1 * getExtendedVerdictReasonsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -538,6 +619,8 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getScore()) != java.lang.Float.floatToIntBits(other.getScore())) return false; if (!reasons_.equals(other.reasons_)) return false; + if (!getExtendedVerdictReasonsList().equals(other.getExtendedVerdictReasonsList())) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -555,6 +638,10 @@ public int hashCode() { hash = (37 * hash) + REASONS_FIELD_NUMBER; hash = (53 * hash) + reasons_.hashCode(); } + if (getExtendedVerdictReasonsCount() > 0) { + hash = (37 * hash) + EXTENDED_VERDICT_REASONS_FIELD_NUMBER; + hash = (53 * hash) + getExtendedVerdictReasonsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -697,6 +784,7 @@ public Builder clear() { score_ = 0F; reasons_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); + extendedVerdictReasons_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -745,6 +833,10 @@ private void buildPartial0(com.google.recaptchaenterprise.v1.RiskAnalysis result if (((from_bitField0_ & 0x00000001) != 0)) { result.score_ = score_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + extendedVerdictReasons_.makeImmutable(); + result.extendedVerdictReasons_ = extendedVerdictReasons_; + } } @java.lang.Override @@ -805,6 +897,16 @@ public Builder mergeFrom(com.google.recaptchaenterprise.v1.RiskAnalysis other) { } onChanged(); } + if (!other.extendedVerdictReasons_.isEmpty()) { + if (extendedVerdictReasons_.isEmpty()) { + extendedVerdictReasons_ = other.extendedVerdictReasons_; + bitField0_ |= 0x00000004; + } else { + ensureExtendedVerdictReasonsIsMutable(); + extendedVerdictReasons_.addAll(other.extendedVerdictReasons_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -856,6 +958,13 @@ public Builder mergeFrom( input.popLimit(oldLimit); break; } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExtendedVerdictReasonsIsMutable(); + extendedVerdictReasons_.add(s); + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1185,6 +1294,190 @@ public Builder addAllReasonsValue(java.lang.Iterable values) return this; } + private com.google.protobuf.LazyStringArrayList extendedVerdictReasons_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExtendedVerdictReasonsIsMutable() { + if (!extendedVerdictReasons_.isModifiable()) { + extendedVerdictReasons_ = + new com.google.protobuf.LazyStringArrayList(extendedVerdictReasons_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Extended verdict reasons to be used for experimentation only. The set of
+     * possible reasons is subject to change.
+     * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @return A list containing the extendedVerdictReasons. + */ + public com.google.protobuf.ProtocolStringList getExtendedVerdictReasonsList() { + extendedVerdictReasons_.makeImmutable(); + return extendedVerdictReasons_; + } + /** + * + * + *
+     * Extended verdict reasons to be used for experimentation only. The set of
+     * possible reasons is subject to change.
+     * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @return The count of extendedVerdictReasons. + */ + public int getExtendedVerdictReasonsCount() { + return extendedVerdictReasons_.size(); + } + /** + * + * + *
+     * Extended verdict reasons to be used for experimentation only. The set of
+     * possible reasons is subject to change.
+     * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param index The index of the element to return. + * @return The extendedVerdictReasons at the given index. + */ + public java.lang.String getExtendedVerdictReasons(int index) { + return extendedVerdictReasons_.get(index); + } + /** + * + * + *
+     * Extended verdict reasons to be used for experimentation only. The set of
+     * possible reasons is subject to change.
+     * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param index The index of the value to return. + * @return The bytes of the extendedVerdictReasons at the given index. + */ + public com.google.protobuf.ByteString getExtendedVerdictReasonsBytes(int index) { + return extendedVerdictReasons_.getByteString(index); + } + /** + * + * + *
+     * Extended verdict reasons to be used for experimentation only. The set of
+     * possible reasons is subject to change.
+     * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param index The index to set the value at. + * @param value The extendedVerdictReasons to set. + * @return This builder for chaining. + */ + public Builder setExtendedVerdictReasons(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtendedVerdictReasonsIsMutable(); + extendedVerdictReasons_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Extended verdict reasons to be used for experimentation only. The set of
+     * possible reasons is subject to change.
+     * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param value The extendedVerdictReasons to add. + * @return This builder for chaining. + */ + public Builder addExtendedVerdictReasons(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtendedVerdictReasonsIsMutable(); + extendedVerdictReasons_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Extended verdict reasons to be used for experimentation only. The set of
+     * possible reasons is subject to change.
+     * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param values The extendedVerdictReasons to add. + * @return This builder for chaining. + */ + public Builder addAllExtendedVerdictReasons(java.lang.Iterable values) { + ensureExtendedVerdictReasonsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, extendedVerdictReasons_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Extended verdict reasons to be used for experimentation only. The set of
+     * possible reasons is subject to change.
+     * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @return This builder for chaining. + */ + public Builder clearExtendedVerdictReasons() { + extendedVerdictReasons_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Extended verdict reasons to be used for experimentation only. The set of
+     * possible reasons is subject to change.
+     * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param value The bytes of the extendedVerdictReasons to add. + * @return This builder for chaining. + */ + public Builder addExtendedVerdictReasonsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExtendedVerdictReasonsIsMutable(); + extendedVerdictReasons_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RiskAnalysisOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RiskAnalysisOrBuilder.java index 07db614c8442..630f334b74ec 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RiskAnalysisOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RiskAnalysisOrBuilder.java @@ -111,4 +111,59 @@ public interface RiskAnalysisOrBuilder * @return The enum numeric value on the wire of reasons at the given index. */ int getReasonsValue(int index); + + /** + * + * + *
+   * Extended verdict reasons to be used for experimentation only. The set of
+   * possible reasons is subject to change.
+   * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @return A list containing the extendedVerdictReasons. + */ + java.util.List getExtendedVerdictReasonsList(); + /** + * + * + *
+   * Extended verdict reasons to be used for experimentation only. The set of
+   * possible reasons is subject to change.
+   * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @return The count of extendedVerdictReasons. + */ + int getExtendedVerdictReasonsCount(); + /** + * + * + *
+   * Extended verdict reasons to be used for experimentation only. The set of
+   * possible reasons is subject to change.
+   * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param index The index of the element to return. + * @return The extendedVerdictReasons at the given index. + */ + java.lang.String getExtendedVerdictReasons(int index); + /** + * + * + *
+   * Extended verdict reasons to be used for experimentation only. The set of
+   * possible reasons is subject to change.
+   * 
+ * + * repeated string extended_verdict_reasons = 3; + * + * @param index The index of the value to return. + * @return The bytes of the extendedVerdictReasons at the given index. + */ + com.google.protobuf.ByteString getExtendedVerdictReasonsBytes(int index); } diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/SearchRelatedAccountGroupMembershipsRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/SearchRelatedAccountGroupMembershipsRequest.java index 2dbf804ff770..7e6abeeb70b9 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/SearchRelatedAccountGroupMembershipsRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/SearchRelatedAccountGroupMembershipsRequest.java @@ -78,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The name of the project to search related account group
    * memberships from. Specify the project name in the following format:
-   * "projects/{project}".
+   * `projects/{project}`.
    * 
* * @@ -105,7 +105,7 @@ public java.lang.String getProject() { *
    * Required. The name of the project to search related account group
    * memberships from. Specify the project name in the following format:
-   * "projects/{project}".
+   * `projects/{project}`.
    * 
* * @@ -133,8 +133,8 @@ public com.google.protobuf.ByteString getProjectBytes() { * * *
-   * Optional. The unique stable hashed user identifier we should search
-   * connections to. The identifier should correspond to a `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.
    * 
* @@ -668,7 +668,7 @@ public Builder mergeFrom( *
      * Required. The name of the project to search related account group
      * memberships from. Specify the project name in the following format:
-     * "projects/{project}".
+     * `projects/{project}`.
      * 
* * @@ -694,7 +694,7 @@ public java.lang.String getProject() { *
      * Required. The name of the project to search related account group
      * memberships from. Specify the project name in the following format:
-     * "projects/{project}".
+     * `projects/{project}`.
      * 
* * @@ -720,7 +720,7 @@ public com.google.protobuf.ByteString getProjectBytes() { *
      * Required. The name of the project to search related account group
      * memberships from. Specify the project name in the following format:
-     * "projects/{project}".
+     * `projects/{project}`.
      * 
* * @@ -745,7 +745,7 @@ public Builder setProject(java.lang.String value) { *
      * Required. The name of the project to search related account group
      * memberships from. Specify the project name in the following format:
-     * "projects/{project}".
+     * `projects/{project}`.
      * 
* * @@ -766,7 +766,7 @@ public Builder clearProject() { *
      * Required. The name of the project to search related account group
      * memberships from. Specify the project name in the following format:
-     * "projects/{project}".
+     * `projects/{project}`.
      * 
* * @@ -792,8 +792,8 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The unique stable hashed user identifier we should search
-     * connections to. The identifier should correspond to a `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.
      * 
* @@ -809,8 +809,8 @@ public com.google.protobuf.ByteString getHashedAccountId() { * * *
-     * Optional. The unique stable hashed user identifier we should search
-     * connections to. The identifier should correspond to a `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.
      * 
* @@ -832,8 +832,8 @@ public Builder setHashedAccountId(com.google.protobuf.ByteString value) { * * *
-     * Optional. The unique stable hashed user identifier we should search
-     * connections to. The identifier should correspond to a `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.
      * 
* diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/SearchRelatedAccountGroupMembershipsRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/SearchRelatedAccountGroupMembershipsRequestOrBuilder.java index 36ca00f6bf08..b80511744e2d 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/SearchRelatedAccountGroupMembershipsRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/SearchRelatedAccountGroupMembershipsRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface SearchRelatedAccountGroupMembershipsRequestOrBuilder *
    * Required. The name of the project to search related account group
    * memberships from. Specify the project name in the following format:
-   * "projects/{project}".
+   * `projects/{project}`.
    * 
* * @@ -45,7 +45,7 @@ public interface SearchRelatedAccountGroupMembershipsRequestOrBuilder *
    * Required. The name of the project to search related account group
    * memberships from. Specify the project name in the following format:
-   * "projects/{project}".
+   * `projects/{project}`.
    * 
* * @@ -60,8 +60,8 @@ public interface SearchRelatedAccountGroupMembershipsRequestOrBuilder * * *
-   * Optional. The unique stable hashed user identifier we should search
-   * connections to. The identifier should correspond to a `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.
    * 
* diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/UpdateFirewallPolicyRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/UpdateFirewallPolicyRequest.java new file mode 100644 index 000000000000..55090f693999 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/UpdateFirewallPolicyRequest.java @@ -0,0 +1,1021 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +/** + * + * + *
+ * The update firewall policy request message.
+ * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest} + */ +public final class UpdateFirewallPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest) + UpdateFirewallPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateFirewallPolicyRequest.newBuilder() to construct. + private UpdateFirewallPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFirewallPolicyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateFirewallPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest.class, + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest.Builder.class); + } + + public static final int FIREWALL_POLICY_FIELD_NUMBER = 1; + private com.google.recaptchaenterprise.v1.FirewallPolicy firewallPolicy_; + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the firewallPolicy field is set. + */ + @java.lang.Override + public boolean hasFirewallPolicy() { + return firewallPolicy_ != null; + } + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The firewallPolicy. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy() { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPolicyOrBuilder() { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.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.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Optional. The mask to control which fields of the policy get updated. If
+   * the mask is not present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Optional. The mask to control which fields of the policy get updated. If
+   * the mask is not present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (firewallPolicy_ != null) { + output.writeMessage(1, getFirewallPolicy()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (firewallPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFirewallPolicy()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest other = + (com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest) obj; + + if (hasFirewallPolicy() != other.hasFirewallPolicy()) return false; + if (hasFirewallPolicy()) { + if (!getFirewallPolicy().equals(other.getFirewallPolicy())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFirewallPolicy()) { + hash = (37 * hash) + FIREWALL_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getFirewallPolicy().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The update firewall policy request message.
+   * 
+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest) + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest.class, + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest.Builder.class); + } + + // Construct using com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + firewallPolicy_ = null; + if (firewallPolicyBuilder_ != null) { + firewallPolicyBuilder_.dispose(); + firewallPolicyBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1_UpdateFirewallPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest build() { + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest buildPartial() { + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest result = + new com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.firewallPolicy_ = + firewallPolicyBuilder_ == null ? firewallPolicy_ : firewallPolicyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest) { + return mergeFrom((com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest other) { + if (other + == com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest.getDefaultInstance()) + return this; + if (other.hasFirewallPolicy()) { + mergeFirewallPolicy(other.getFirewallPolicy()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFirewallPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.recaptchaenterprise.v1.FirewallPolicy firewallPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder> + firewallPolicyBuilder_; + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the firewallPolicy field is set. + */ + public boolean hasFirewallPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The firewallPolicy. + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy() { + if (firewallPolicyBuilder_ == null) { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } else { + return firewallPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFirewallPolicy(com.google.recaptchaenterprise.v1.FirewallPolicy value) { + if (firewallPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firewallPolicy_ = value; + } else { + firewallPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFirewallPolicy( + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder builderForValue) { + if (firewallPolicyBuilder_ == null) { + firewallPolicy_ = builderForValue.build(); + } else { + firewallPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFirewallPolicy(com.google.recaptchaenterprise.v1.FirewallPolicy value) { + if (firewallPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && firewallPolicy_ != null + && firewallPolicy_ + != com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance()) { + getFirewallPolicyBuilder().mergeFrom(value); + } else { + firewallPolicy_ = value; + } + } else { + firewallPolicyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFirewallPolicy() { + bitField0_ = (bitField0_ & ~0x00000001); + firewallPolicy_ = null; + if (firewallPolicyBuilder_ != null) { + firewallPolicyBuilder_.dispose(); + firewallPolicyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicy.Builder getFirewallPolicyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFirewallPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPolicyOrBuilder() { + if (firewallPolicyBuilder_ != null) { + return firewallPolicyBuilder_.getMessageOrBuilder(); + } else { + return firewallPolicy_ == null + ? com.google.recaptchaenterprise.v1.FirewallPolicy.getDefaultInstance() + : firewallPolicy_; + } + } + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder> + getFirewallPolicyFieldBuilder() { + if (firewallPolicyBuilder_ == null) { + firewallPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1.FirewallPolicy, + com.google.recaptchaenterprise.v1.FirewallPolicy.Builder, + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder>( + getFirewallPolicy(), getParentForChildren(), isClean()); + firewallPolicy_ = null; + } + return firewallPolicyBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Optional. The mask to control which fields of the policy get updated. If
+     * the mask is not present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. The mask to control which fields of the policy get updated. If
+     * the mask is not present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The mask to control which fields of the policy get updated. If
+     * the mask is not present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + 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.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The mask to control which fields of the policy get updated. If
+     * the mask is not present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Optional. The mask to control which fields of the policy get updated. If
+     * the mask is not present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest) + private static final com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest(); + } + + public static com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFirewallPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/UpdateFirewallPolicyRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/UpdateFirewallPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..d3d370999177 --- /dev/null +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/UpdateFirewallPolicyRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto + +package com.google.recaptchaenterprise.v1; + +public interface UpdateFirewallPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the firewallPolicy field is set. + */ + boolean hasFirewallPolicy(); + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The firewallPolicy. + */ + com.google.recaptchaenterprise.v1.FirewallPolicy getFirewallPolicy(); + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1.FirewallPolicy firewall_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.recaptchaenterprise.v1.FirewallPolicyOrBuilder getFirewallPolicyOrBuilder(); + + /** + * + * + *
+   * Optional. The mask to control which fields of the policy get updated. If
+   * the mask is not present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields of the policy get updated. If
+   * the mask is not present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields of the policy get updated. If
+   * the mask is not present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/WafSettings.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/WafSettings.java index 28c1bbcbef20..ddd73cf573bc 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/WafSettings.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/WafSettings.java @@ -116,6 +116,17 @@ public enum WafFeature implements com.google.protobuf.ProtocolMessageEnum { * ACTION_TOKEN = 3; */ ACTION_TOKEN(3), + /** + * + * + *
+     * Use reCAPTCHA WAF express protection to protect any content other than
+     * web pages, like APIs and IoT devices.
+     * 
+ * + * EXPRESS = 5; + */ + EXPRESS(5), UNRECOGNIZED(-1), ; @@ -160,6 +171,17 @@ public enum WafFeature implements com.google.protobuf.ProtocolMessageEnum { * ACTION_TOKEN = 3; */ public static final int ACTION_TOKEN_VALUE = 3; + /** + * + * + *
+     * Use reCAPTCHA WAF express protection to protect any content other than
+     * web pages, like APIs and IoT devices.
+     * 
+ * + * EXPRESS = 5; + */ + public static final int EXPRESS_VALUE = 5; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -193,6 +215,8 @@ public static WafFeature forNumber(int value) { return SESSION_TOKEN; case 3: return ACTION_TOKEN; + case 5: + return EXPRESS; default: return null; } @@ -276,6 +300,16 @@ public enum WafService implements com.google.protobuf.ProtocolMessageEnum { * CA = 1; */ CA(1), + /** + * + * + *
+     * Fastly
+     * 
+ * + * FASTLY = 3; + */ + FASTLY(3), UNRECOGNIZED(-1), ; @@ -299,6 +333,16 @@ public enum WafService implements com.google.protobuf.ProtocolMessageEnum { * CA = 1; */ public static final int CA_VALUE = 1; + /** + * + * + *
+     * Fastly
+     * 
+ * + * FASTLY = 3; + */ + public static final int FASTLY_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -328,6 +372,8 @@ public static WafService forNumber(int value) { return WAF_SERVICE_UNSPECIFIED; case 1: return CA; + case 3: + return FASTLY; default: return null; } diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/proto/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/proto/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto index e73de0c97e0c..3dfa99480186 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/proto/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/proto/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1"; option go_package = "cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb;recaptchaenterprisepb"; @@ -115,7 +116,7 @@ service RecaptchaEnterpriseService { // 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 Site Key, and + // 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. rpc MigrateKey(MigrateKeyRequest) returns (Key) { @@ -134,6 +135,54 @@ service RecaptchaEnterpriseService { option (google.api.method_signature) = "name"; } + // Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA + // Enterprise actions can be executed. + // A project may have a maximum of 1000 policies. + rpc CreateFirewallPolicy(CreateFirewallPolicyRequest) + returns (FirewallPolicy) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/firewallpolicies" + body: "firewall_policy" + }; + option (google.api.method_signature) = "parent,firewall_policy"; + } + + // Returns the list of all firewall policies that belong to a project. + rpc ListFirewallPolicies(ListFirewallPoliciesRequest) + returns (ListFirewallPoliciesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/firewallpolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified firewall policy. + rpc GetFirewallPolicy(GetFirewallPolicyRequest) returns (FirewallPolicy) { + option (google.api.http) = { + get: "/v1/{name=projects/*/firewallpolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the specified firewall policy. + rpc UpdateFirewallPolicy(UpdateFirewallPolicyRequest) + returns (FirewallPolicy) { + option (google.api.http) = { + patch: "/v1/{firewall_policy.name=projects/*/firewallpolicies/*}" + body: "firewall_policy" + }; + option (google.api.method_signature) = "firewall_policy,update_mask"; + } + + // Deletes the specified firewall policy. + rpc DeleteFirewallPolicy(DeleteFirewallPolicyRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/firewallpolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + // List groups of related accounts. rpc ListRelatedAccountGroups(ListRelatedAccountGroupsRequest) returns (ListRelatedAccountGroupsResponse) { @@ -168,7 +217,7 @@ service RecaptchaEnterpriseService { // The create assessment request message. message CreateAssessmentRequest { // Required. The name of the project in which the assessment will be created, - // in the format "projects/{project}". + // in the format `projects/{project}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -389,7 +438,7 @@ message AnnotateAssessmentRequest { } // Required. The resource name of the Assessment, in the format - // "projects/{project}/assessments/{assessment}". + // `projects/{project}/assessments/{assessment}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -538,7 +587,7 @@ message Assessment { }; // Output only. The resource name for the Assessment in the format - // "projects/{project}/assessments/{assessment}". + // `projects/{project}/assessments/{assessment}`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // The event being assessed. @@ -563,8 +612,16 @@ message Assessment { // are used to to check for leaks privately without sharing user credentials. PrivatePasswordLeakVerification private_password_leak_verification = 8; + // Assessment returned when firewall policies belonging to the project are + // evaluated using the field firewall_policy_evaluation. + FirewallPolicyAssessment firewall_policy_assessment = 10; + // Assessment returned by Fraud Prevention when TransactionData is provided. FraudPreventionAssessment fraud_prevention_assessment = 11; + + // Output only. Fraud Signals specific to the users involved in a payment + // transaction. + FraudSignals fraud_signals = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The event being assessed. @@ -594,6 +651,30 @@ message Event { // identifier must be hashed using hmac-sha256 with stable secret. bytes hashed_account_id = 6 [(google.api.field_behavior) = OPTIONAL]; + // 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. + bool express = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URI resource the user requested that triggered an assessment. + string requested_uri = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag for running WAF token assessment. + // If enabled, the token must be specified, and have been created by a + // WAF-enabled key. + bool waf_token_assessment = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional JA3 fingerprint for SSL clients. + string ja3 = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. HTTP header information about the request. + repeated string headers = 11 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + bool firewall_policy_evaluation = 12 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Data describing a payment transaction to be assessed. Sending // this data enables reCAPTCHA Enterprise Fraud Prevention and the // FraudPreventionAssessment component in the response. @@ -776,6 +857,10 @@ message RiskAnalysis { // Reasons contributing to the risk analysis verdict. repeated ClassificationReason reasons = 2; + + // Extended verdict reasons to be used for experimentation only. The set of + // possible reasons is subject to change. + repeated string extended_verdict_reasons = 3; } // Properties of the provided event token. @@ -838,21 +923,31 @@ message FraudPreventionAssessment { // Information about stolen instrument fraud, where the user is not the // legitimate owner of the instrument being used for the purchase. message StolenInstrumentVerdict { - // Probability (0-1) of this transaction being executed with a stolen - // instrument. + // Probability of this transaction being executed with a stolen instrument. + // Values are from 0.0 (lowest) to 1.0 (highest). float risk = 1; } // Information about card testing fraud, where an adversary is testing // fraudulently obtained cards or brute forcing their details. message CardTestingVerdict { - // Probability (0-1) of this transaction attempt being part of a card - // testing attack. + // Probability of this transaction attempt being part of a card testing + // attack. + // Values are from 0.0 (lowest) to 1.0 (highest). float risk = 1; } - // Probability (0-1) of this transaction being fraudulent. Summarizes the - // combined risk of attack vectors below. + // Information about behavioral trust of the transaction. + message BehavioralTrustVerdict { + // Probability of this transaction attempt being executed in a behaviorally + // trustworthy way. + // Values are from 0.0 (lowest) to 1.0 (highest). + float trust = 1; + } + + // Probability of this transaction being fraudulent. Summarizes the combined + // risk of attack vectors below. + // Values are from 0.0 (lowest) to 1.0 (highest). float transaction_risk = 1; // Assessment of this transaction for risk of a stolen instrument. @@ -861,6 +956,57 @@ message FraudPreventionAssessment { // Assessment of this transaction for risk of being part of a card testing // attack. CardTestingVerdict card_testing_verdict = 3; + + // Assessment of this transaction for behavioral trust. + BehavioralTrustVerdict behavioral_trust_verdict = 4; +} + +// Fraud signals describing users and cards involved in the transaction. +message FraudSignals { + // Signals describing the user involved in this transaction. + message UserSignals { + // Output only. This user (based on email, phone, and other identifiers) has + // been seen on the internet for at least this number of days. + int32 active_days_lower_bound = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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. + float synthetic_risk = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Signals describing the payment card used in this transaction. + message CardSignals { + // Risk labels describing the card being assessed, such as its funding + // mechanism. + enum CardLabel { + // No label specified. + CARD_LABEL_UNSPECIFIED = 0; + + // This card has been detected as prepaid. + PREPAID = 1; + + // This card has been detected as virtual, such as a card number generated + // for a single transaction or merchant. + VIRTUAL = 2; + + // This card has been detected as being used in an unexpected geographic + // location. + UNEXPECTED_LOCATION = 3; + } + + // Output only. The labels for the payment card in this transaction. + repeated CardLabel card_labels = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Signals describing the end user in this transaction. + UserSignals user_signals = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Signals describing the payment card or cards used in this + // transaction. + CardSignals card_signals = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Account defender risk assessment. @@ -894,7 +1040,7 @@ message AccountDefenderAssessment { // The create key request message. message CreateKeyRequest { // Required. The name of the project in which the key will be created, in the - // format "projects/{project}". + // format `projects/{project}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -909,7 +1055,7 @@ message CreateKeyRequest { // The list keys request message. message ListKeysRequest { // Required. The name of the project that contains the keys that will be - // listed, in the format "projects/{project}". + // listed, in the format `projects/{project}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -939,7 +1085,7 @@ message ListKeysResponse { // The retrieve legacy secret key request message. message RetrieveLegacySecretKeyRequest { // Required. The public key name linked to the requested secret key in the - // format "projects/{project}/keys/{key}". + // format `projects/{project}/keys/{key}`. string key = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -951,7 +1097,7 @@ message RetrieveLegacySecretKeyRequest { // The get key request message. message GetKeyRequest { // Required. The name of the requested key, in the format - // "projects/{project}/keys/{key}". + // `projects/{project}/keys/{key}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -974,7 +1120,7 @@ message UpdateKeyRequest { // The delete key request message. message DeleteKeyRequest { // Required. The name of the key to be deleted, in the format - // "projects/{project}/keys/{key}". + // `projects/{project}/keys/{key}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -983,10 +1129,90 @@ message DeleteKeyRequest { ]; } +// The create firewall policy request message. +message CreateFirewallPolicyRequest { + // Required. The name of the project this policy will apply to, in the format + // `projects/{project}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. Information to create the policy. + FirewallPolicy firewall_policy = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The list firewall policies request message. +message ListFirewallPoliciesRequest { + // Required. The name of the project to list the policies for, in the format + // `projects/{project}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Optional. The maximum number of policies to return. Default is 10. Max + // limit is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous. + // ListFirewallPoliciesRequest, if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response to request to list firewall policies belonging to a key. +message ListFirewallPoliciesResponse { + // Policy details. + repeated FirewallPolicy firewall_policies = 1; + + // Token to retrieve the next page of results. It is set to empty if no + // policies remain in results. + string next_page_token = 2; +} + +// The get firewall policy request message. +message GetFirewallPolicyRequest { + // Required. The name of the requested policy, in the format + // `projects/{project}/firewallpolicies/{firewallpolicy}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recaptchaenterprise.googleapis.com/FirewallPolicy" + } + ]; +} + +// The update firewall policy request message. +message UpdateFirewallPolicyRequest { + // Required. The policy to update. + FirewallPolicy firewall_policy = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields of the policy get updated. If + // the mask is not present, all fields will be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The delete firewall policy request message. +message DeleteFirewallPolicyRequest { + // Required. The name of the policy to be deleted, in the format + // `projects/{project}/firewallpolicies/{firewallpolicy}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "recaptchaenterprise.googleapis.com/FirewallPolicy" + } + ]; +} + // The migrate key request message. message MigrateKeyRequest { // Required. The name of the key to be migrated, in the format - // "projects/{project}/keys/{key}". + // `projects/{project}/keys/{key}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1008,7 +1234,7 @@ message MigrateKeyRequest { // The get metrics request message. message GetMetricsRequest { // Required. The name of the requested metrics, in the format - // "projects/{project}/keys/{key}/metrics". + // `projects/{project}/keys/{key}/metrics`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1025,7 +1251,7 @@ message Metrics { }; // Output only. The name of the metrics, in the format - // "projects/{project}/keys/{key}/metrics". + // `projects/{project}/keys/{key}/metrics`. string name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Inclusive start time aligned to a day (UTC). @@ -1060,13 +1286,13 @@ message Key { }; // The resource name for the Key in the format - // "projects/{project}/keys/{key}". + // `projects/{project}/keys/{key}`. string name = 1; // Human-readable display name of this key. Modifiable by user. string display_name = 2; - // Platform specific settings for this key. The key can only be used on a + // Platform-specific settings for this key. The key can only be used on a // platform for which the settings are enabled. oneof platform_settings { // Settings for keys that can be used by websites. @@ -1079,11 +1305,11 @@ message Key { IOSKeySettings ios_settings = 5; } - // See - // Creating and managing labels. + // See [Creating and managing labels] + // (https://cloud.google.com/recaptcha-enterprise/docs/labels). map labels = 6; - // Output only. The timestamp corresponding to the creation of this Key. + // Output only. The timestamp corresponding to the creation of this key. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -1190,6 +1416,10 @@ message AndroidKeySettings { // Android package names of apps allowed to use the key. // Example: 'com.companyname.appname' repeated string allowed_package_names = 1; + + // 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. + bool support_non_google_app_store_distribution = 3; } // Settings specific to keys that can be used by iOS apps. @@ -1200,6 +1430,31 @@ message IOSKeySettings { // iOS bundle ids of apps allowed to use the key. // Example: 'com.companyname.productname.appname' repeated string allowed_bundle_ids = 1; + + // 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. + AppleDeveloperId apple_developer_id = 3; +} + +// Contains fields that are required to perform Apple-specific integrity checks. +message AppleDeveloperId { + // 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. + string private_key = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + + // Required. The Apple developer key ID (10-character string). + string key_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Apple team ID (10-character string) owning the provisioning + // profile used to build your application. + string team_id = 3 [(google.api.field_behavior) = REQUIRED]; } // Score distribution. @@ -1239,6 +1494,116 @@ message ChallengeMetrics { int64 passed_count = 4; } +// Policy config assessment. +message FirewallPolicyAssessment { + // If the processing of a policy config fails, an error will be populated + // and the firewall_policy will be left empty. + google.rpc.Status error = 5; + + // 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. + FirewallPolicy firewall_policy = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// An individual action. Each action represents what to do if a policy +// matches. +message FirewallAction { + // An allow action continues processing a request unimpeded. + message AllowAction {} + + // A block action serves an HTTP error code a prevents the request from + // hitting the backend. + message BlockAction {} + + // A redirect action returns a 307 (temporary redirect) response, pointing + // the user to a ReCaptcha interstitial page to attach a token. + message RedirectAction {} + + // A substitute action transparently serves a different page than the one + // requested. + message SubstituteAction { + // The address to redirect to. The target is a relative path in the + // current host. Example: "/blog/404.html". + string path = 1; + } + + // A set header action sets a header and forwards the request to the + // backend. This can be used to trigger custom protection implemented on the + // backend. + message SetHeaderAction { + // The header key to set in the request to the backend server. + string key = 1; + + // The header value to set in the request to the backend server. + string value = 2; + } + + oneof firewall_action_oneof { + // The user request did not match any policy and should be allowed + // access to the requested resource. + AllowAction allow = 1; + + // This action will deny access to a given page. The user will get an HTTP + // error code. + BlockAction block = 2; + + // This action will redirect the request to a ReCaptcha interstitial to + // attach a token. + RedirectAction redirect = 5; + + // This action will transparently serve a different page to an offending + // user. + SubstituteAction substitute = 3; + + // This action will set a custom header but allow the request to continue + // to the customer backend. + SetHeaderAction set_header = 4; + } +} + +// A FirewallPolicy represents a single matching pattern and resulting actions +// to take. +message FirewallPolicy { + option (google.api.resource) = { + type: "recaptchaenterprise.googleapis.com/FirewallPolicy" + pattern: "projects/{project}/firewallpolicies/{firewallpolicy}" + }; + + // The resource name for the FirewallPolicy in the format + // `projects/{project}/firewallpolicies/{firewallpolicy}`. + string name = 1; + + // A description of what this policy aims to achieve, for convenience + // purposes. The description can at most include 256 UTF-8 characters. + string description = 2; + + // 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. + string path = 4; + + // 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. + string condition = 5; + + // 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. + repeated FirewallAction actions = 6; +} + // The request message to list memberships in a related account group. message ListRelatedAccountGroupMembershipsRequest { // Required. The resource name for the related account group in the format @@ -1277,7 +1642,7 @@ message ListRelatedAccountGroupMembershipsResponse { // The request message to list related account groups. message ListRelatedAccountGroupsRequest { // Required. The name of the project to list related account groups from, in - // the format "projects/{project}". + // the format `projects/{project}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1313,7 +1678,7 @@ message ListRelatedAccountGroupsResponse { message SearchRelatedAccountGroupMembershipsRequest { // Required. The name of the project to search related account group // memberships from. Specify the project name in the following format: - // "projects/{project}". + // `projects/{project}`. string project = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1321,8 +1686,8 @@ message SearchRelatedAccountGroupMembershipsRequest { } ]; - // Optional. The unique stable hashed user identifier we should search - // connections to. The identifier should correspond to a `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. bytes hashed_account_id = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -1408,6 +1773,10 @@ message WafSettings { // Use reCAPTCHA action-tokens to protect user actions. ACTION_TOKEN = 3; + + // Use reCAPTCHA WAF express protection to protect any content other than + // web pages, like APIs and IoT devices. + EXPRESS = 5; } // Web Application Firewalls supported by reCAPTCHA Enterprise. @@ -1417,6 +1786,9 @@ message WafSettings { // Cloud Armor CA = 1; + + // Fastly + FASTLY = 3; } // Required. The WAF service that uses this key. diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentRequest.java index e0fd81da0674..fa508503c2a0 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentRequest.java @@ -745,7 +745,7 @@ private Reason(int value) { * *
    * Required. The resource name of the Assessment, in the format
-   * "projects/{project_number}/assessments/{assessment_id}".
+   * `projects/{project_number}/assessments/{assessment_id}`.
    * 
* * @@ -771,7 +771,7 @@ public java.lang.String getName() { * *
    * Required. The resource name of the Assessment, in the format
-   * "projects/{project_number}/assessments/{assessment_id}".
+   * `projects/{project_number}/assessments/{assessment_id}`.
    * 
* * @@ -1546,7 +1546,7 @@ public Builder mergeFrom( * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * @@ -1571,7 +1571,7 @@ public java.lang.String getName() { * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * @@ -1596,7 +1596,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * @@ -1620,7 +1620,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * @@ -1640,7 +1640,7 @@ public Builder clearName() { * *
      * Required. The resource name of the Assessment, in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentRequestOrBuilder.java index 05048d6a89c3..5f82c0db6168 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface AnnotateAssessmentRequestOrBuilder * *
    * Required. The resource name of the Assessment, in the format
-   * "projects/{project_number}/assessments/{assessment_id}".
+   * `projects/{project_number}/assessments/{assessment_id}`.
    * 
* * @@ -43,7 +43,7 @@ public interface AnnotateAssessmentRequestOrBuilder * *
    * Required. The resource name of the Assessment, in the format
-   * "projects/{project_number}/assessments/{assessment_id}".
+   * `projects/{project_number}/assessments/{assessment_id}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Assessment.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Assessment.java index 40d98b2d5276..e930d2456985 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Assessment.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Assessment.java @@ -348,7 +348,7 @@ private ClassificationReason(int value) { * *
    * Output only. The resource name for the Assessment in the format
-   * "projects/{project_number}/assessments/{assessment_id}".
+   * `projects/{project_number}/assessments/{assessment_id}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -372,7 +372,7 @@ public java.lang.String getName() { * *
    * Output only. The resource name for the Assessment in the format
-   * "projects/{project_number}/assessments/{assessment_id}".
+   * `projects/{project_number}/assessments/{assessment_id}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1436,7 +1436,7 @@ public Builder mergeFrom( * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1459,7 +1459,7 @@ public java.lang.String getName() { * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1482,7 +1482,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1504,7 +1504,7 @@ public Builder setName(java.lang.String value) { * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1522,7 +1522,7 @@ public Builder clearName() { * *
      * Output only. The resource name for the Assessment in the format
-     * "projects/{project_number}/assessments/{assessment_id}".
+     * `projects/{project_number}/assessments/{assessment_id}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AssessmentOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AssessmentOrBuilder.java index 81536dadbfb3..29992a373521 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AssessmentOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AssessmentOrBuilder.java @@ -28,7 +28,7 @@ public interface AssessmentOrBuilder * *
    * Output only. The resource name for the Assessment in the format
-   * "projects/{project_number}/assessments/{assessment_id}".
+   * `projects/{project_number}/assessments/{assessment_id}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -41,7 +41,7 @@ public interface AssessmentOrBuilder * *
    * Output only. The resource name for the Assessment in the format
-   * "projects/{project_number}/assessments/{assessment_id}".
+   * `projects/{project_number}/assessments/{assessment_id}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequest.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequest.java index bf8afc5c1540..98b0c32679bd 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequest.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the project in which the assessment will be created,
-   * in the format "projects/{project_number}".
+   * in the format `projects/{project_number}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getParent() { * *
    * Required. The name of the project in which the assessment will be created,
-   * in the format "projects/{project_number}".
+   * in the format `projects/{project_number}`.
    * 
* * @@ -558,7 +558,7 @@ public Builder mergeFrom( * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project_number}".
+     * in the format `projects/{project_number}`.
      * 
* * @@ -583,7 +583,7 @@ public java.lang.String getParent() { * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project_number}".
+     * in the format `projects/{project_number}`.
      * 
* * @@ -608,7 +608,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project_number}".
+     * in the format `projects/{project_number}`.
      * 
* * @@ -632,7 +632,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project_number}".
+     * in the format `projects/{project_number}`.
      * 
* * @@ -652,7 +652,7 @@ public Builder clearParent() { * *
      * Required. The name of the project in which the assessment will be created,
-     * in the format "projects/{project_number}".
+     * in the format `projects/{project_number}`.
      * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequestOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequestOrBuilder.java index 5788455e46b9..d6f34142307d 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequestOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface CreateAssessmentRequestOrBuilder * *
    * Required. The name of the project in which the assessment will be created,
-   * in the format "projects/{project_number}".
+   * in the format `projects/{project_number}`.
    * 
* * @@ -43,7 +43,7 @@ public interface CreateAssessmentRequestOrBuilder * *
    * Required. The name of the project in which the assessment will be created,
-   * in the format "projects/{project_number}".
+   * in the format `projects/{project_number}`.
    * 
* * diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/FraudPreventionAssessment.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/FraudPreventionAssessment.java index 2ea9064ed790..98d372dc0e7d 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/FraudPreventionAssessment.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/FraudPreventionAssessment.java @@ -1267,6 +1267,610 @@ public com.google.protobuf.Parser getParserForType() { } } + public interface BehavioralTrustVerdictOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Probability (0-1) of this transaction attempt being executed in a
+     * behaviorally trustworthy way.
+     * 
+ * + * float trust = 1; + * + * @return The trust. + */ + float getTrust(); + } + /** + * + * + *
+   * Information about behavioral trust of the transaction.
+   * 
+ * + * Protobuf type {@code + * google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict} + */ + public static final class BehavioralTrustVerdict extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict) + BehavioralTrustVerdictOrBuilder { + private static final long serialVersionUID = 0L; + // Use BehavioralTrustVerdict.newBuilder() to construct. + private BehavioralTrustVerdict(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BehavioralTrustVerdict() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BehavioralTrustVerdict(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.class, + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.Builder.class); + } + + public static final int TRUST_FIELD_NUMBER = 1; + private float trust_ = 0F; + /** + * + * + *
+     * Probability (0-1) of this transaction attempt being executed in a
+     * behaviorally trustworthy way.
+     * 
+ * + * float trust = 1; + * + * @return The trust. + */ + @java.lang.Override + public float getTrust() { + return trust_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(trust_) != 0) { + output.writeFloat(1, trust_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(trust_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, trust_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + other = + (com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict) + obj; + + if (java.lang.Float.floatToIntBits(getTrust()) + != java.lang.Float.floatToIntBits(other.getTrust())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRUST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getTrust()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Information about behavioral trust of the transaction.
+     * 
+ * + * Protobuf type {@code + * google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict) + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.class, + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.Builder.class); + } + + // Construct using + // com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trust_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + getDefaultInstanceForType() { + return com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.getDefaultInstance(); + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + build() { + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + buildPartial() { + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + result = + new com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trust_ = trust_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict) { + return mergeFrom( + (com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + other) { + if (other + == com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.getDefaultInstance()) return this; + if (other.getTrust() != 0F) { + setTrust(other.getTrust()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + trust_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float trust_; + /** + * + * + *
+       * Probability (0-1) of this transaction attempt being executed in a
+       * behaviorally trustworthy way.
+       * 
+ * + * float trust = 1; + * + * @return The trust. + */ + @java.lang.Override + public float getTrust() { + return trust_; + } + /** + * + * + *
+       * Probability (0-1) of this transaction attempt being executed in a
+       * behaviorally trustworthy way.
+       * 
+ * + * float trust = 1; + * + * @param value The trust to set. + * @return This builder for chaining. + */ + public Builder setTrust(float value) { + + trust_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Probability (0-1) of this transaction attempt being executed in a
+       * behaviorally trustworthy way.
+       * 
+ * + * float trust = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrust() { + bitField0_ = (bitField0_ & ~0x00000001); + trust_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict) + } + + // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict) + private static final com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict(); + } + + public static com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BehavioralTrustVerdict parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int TRANSACTION_RISK_FIELD_NUMBER = 1; private float transactionRisk_ = 0F; /** @@ -1413,6 +2017,68 @@ public boolean hasCardTestingVerdict() { : cardTestingVerdict_; } + public static final int BEHAVIORAL_TRUST_VERDICT_FIELD_NUMBER = 4; + private com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + behavioralTrustVerdict_; + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return Whether the behavioralTrustVerdict field is set. + */ + @java.lang.Override + public boolean hasBehavioralTrustVerdict() { + return behavioralTrustVerdict_ != null; + } + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return The behavioralTrustVerdict. + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + getBehavioralTrustVerdict() { + return behavioralTrustVerdict_ == null + ? com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + .getDefaultInstance() + : behavioralTrustVerdict_; + } + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + @java.lang.Override + public com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder + getBehavioralTrustVerdictOrBuilder() { + return behavioralTrustVerdict_ == null + ? com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + .getDefaultInstance() + : behavioralTrustVerdict_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1436,6 +2102,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cardTestingVerdict_ != null) { output.writeMessage(3, getCardTestingVerdict()); } + if (behavioralTrustVerdict_ != null) { + output.writeMessage(4, getBehavioralTrustVerdict()); + } getUnknownFields().writeTo(output); } @@ -1455,6 +2124,10 @@ public int getSerializedSize() { if (cardTestingVerdict_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCardTestingVerdict()); } + if (behavioralTrustVerdict_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBehavioralTrustVerdict()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1481,6 +2154,10 @@ public boolean equals(final java.lang.Object obj) { if (hasCardTestingVerdict()) { if (!getCardTestingVerdict().equals(other.getCardTestingVerdict())) return false; } + if (hasBehavioralTrustVerdict() != other.hasBehavioralTrustVerdict()) return false; + if (hasBehavioralTrustVerdict()) { + if (!getBehavioralTrustVerdict().equals(other.getBehavioralTrustVerdict())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1502,6 +2179,10 @@ public int hashCode() { hash = (37 * hash) + CARD_TESTING_VERDICT_FIELD_NUMBER; hash = (53 * hash) + getCardTestingVerdict().hashCode(); } + if (hasBehavioralTrustVerdict()) { + hash = (37 * hash) + BEHAVIORAL_TRUST_VERDICT_FIELD_NUMBER; + hash = (53 * hash) + getBehavioralTrustVerdict().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1653,6 +2334,11 @@ public Builder clear() { cardTestingVerdictBuilder_.dispose(); cardTestingVerdictBuilder_ = null; } + behavioralTrustVerdict_ = null; + if (behavioralTrustVerdictBuilder_ != null) { + behavioralTrustVerdictBuilder_.dispose(); + behavioralTrustVerdictBuilder_ = null; + } return this; } @@ -1706,6 +2392,12 @@ private void buildPartial0( ? cardTestingVerdict_ : cardTestingVerdictBuilder_.build(); } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.behavioralTrustVerdict_ = + behavioralTrustVerdictBuilder_ == null + ? behavioralTrustVerdict_ + : behavioralTrustVerdictBuilder_.build(); + } } @java.lang.Override @@ -1765,6 +2457,9 @@ public Builder mergeFrom( if (other.hasCardTestingVerdict()) { mergeCardTestingVerdict(other.getCardTestingVerdict()); } + if (other.hasBehavioralTrustVerdict()) { + mergeBehavioralTrustVerdict(other.getBehavioralTrustVerdict()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1811,6 +2506,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + input.readMessage( + getBehavioralTrustVerdictFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2343,6 +3045,231 @@ public Builder clearCardTestingVerdict() { return cardTestingVerdictBuilder_; } + private com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + behavioralTrustVerdict_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict, + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + .Builder, + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder> + behavioralTrustVerdictBuilder_; + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return Whether the behavioralTrustVerdict field is set. + */ + public boolean hasBehavioralTrustVerdict() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return The behavioralTrustVerdict. + */ + public com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + getBehavioralTrustVerdict() { + if (behavioralTrustVerdictBuilder_ == null) { + return behavioralTrustVerdict_ == null + ? com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.getDefaultInstance() + : behavioralTrustVerdict_; + } else { + return behavioralTrustVerdictBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public Builder setBehavioralTrustVerdict( + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + value) { + if (behavioralTrustVerdictBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + behavioralTrustVerdict_ = value; + } else { + behavioralTrustVerdictBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public Builder setBehavioralTrustVerdict( + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + .Builder + builderForValue) { + if (behavioralTrustVerdictBuilder_ == null) { + behavioralTrustVerdict_ = builderForValue.build(); + } else { + behavioralTrustVerdictBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public Builder mergeBehavioralTrustVerdict( + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + value) { + if (behavioralTrustVerdictBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && behavioralTrustVerdict_ != null + && behavioralTrustVerdict_ + != com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.getDefaultInstance()) { + getBehavioralTrustVerdictBuilder().mergeFrom(value); + } else { + behavioralTrustVerdict_ = value; + } + } else { + behavioralTrustVerdictBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public Builder clearBehavioralTrustVerdict() { + bitField0_ = (bitField0_ & ~0x00000008); + behavioralTrustVerdict_ = null; + if (behavioralTrustVerdictBuilder_ != null) { + behavioralTrustVerdictBuilder_.dispose(); + behavioralTrustVerdictBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + .Builder + getBehavioralTrustVerdictBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBehavioralTrustVerdictFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + public com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder + getBehavioralTrustVerdictOrBuilder() { + if (behavioralTrustVerdictBuilder_ != null) { + return behavioralTrustVerdictBuilder_.getMessageOrBuilder(); + } else { + return behavioralTrustVerdict_ == null + ? com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.getDefaultInstance() + : behavioralTrustVerdict_; + } + } + /** + * + * + *
+     * Assessment of this transaction for behavioral trust.
+     * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict, + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + .Builder, + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder> + getBehavioralTrustVerdictFieldBuilder() { + if (behavioralTrustVerdictBuilder_ == null) { + behavioralTrustVerdictBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict, + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdict.Builder, + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment + .BehavioralTrustVerdictOrBuilder>( + getBehavioralTrustVerdict(), getParentForChildren(), isClean()); + behavioralTrustVerdict_ = null; + } + return behavioralTrustVerdictBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/FraudPreventionAssessmentOrBuilder.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/FraudPreventionAssessmentOrBuilder.java index 094952f64c69..2a2b0ecde477 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/FraudPreventionAssessmentOrBuilder.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/FraudPreventionAssessmentOrBuilder.java @@ -125,4 +125,47 @@ public interface FraudPreventionAssessmentOrBuilder */ com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.CardTestingVerdictOrBuilder getCardTestingVerdictOrBuilder(); + + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return Whether the behavioralTrustVerdict field is set. + */ + boolean hasBehavioralTrustVerdict(); + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + * + * @return The behavioralTrustVerdict. + */ + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict + getBehavioralTrustVerdict(); + /** + * + * + *
+   * Assessment of this transaction for behavioral trust.
+   * 
+ * + * + * .google.cloud.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdict behavioral_trust_verdict = 4; + * + */ + com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment.BehavioralTrustVerdictOrBuilder + getBehavioralTrustVerdictOrBuilder(); } diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/RecaptchaEnterpriseProto.java b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/RecaptchaEnterpriseProto.java index 77f5060e9212..d686bdf7493b 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/RecaptchaEnterpriseProto.java +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/RecaptchaEnterpriseProto.java @@ -91,6 +91,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_CardTestingVerdict_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_CardTestingVerdict_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_recaptchaenterprise_v1beta1_AccountDefenderAssessment_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -228,47 +232,51 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "IFIED\020\000\022\032\n\026UNKNOWN_INVALID_REASON\020\001\022\r\n\tM" + "ALFORMED\020\002\022\013\n\007EXPIRED\020\003\022\010\n\004DUPE\020\004\022\025\n\rSIT" + "E_MISMATCH\020\005\032\002\010\001\022\013\n\007MISSING\020\006\022\021\n\rBROWSER" - + "_ERROR\020\007\"\370\002\n\031FraudPreventionAssessment\022\030" + + "_ERROR\020\007\"\237\004\n\031FraudPreventionAssessment\022\030" + "\n\020transaction_risk\030\001 \001(\002\022~\n\031stolen_instr" + "ument_verdict\030\002 \001(\0132[.google.cloud.recap" + "tchaenterprise.v1beta1.FraudPreventionAs" + "sessment.StolenInstrumentVerdict\022t\n\024card" + "_testing_verdict\030\003 \001(\0132V.google.cloud.re" + "captchaenterprise.v1beta1.FraudPreventio" - + "nAssessment.CardTestingVerdict\032\'\n\027Stolen" - + "InstrumentVerdict\022\014\n\004risk\030\001 \001(\002\032\"\n\022CardT" - + "estingVerdict\022\014\n\004risk\030\001 \001(\002\"\273\002\n\031AccountD" - + "efenderAssessment\022h\n\006labels\030\001 \003(\0162X.goog" - + "le.cloud.recaptchaenterprise.v1beta1.Acc" - + "ountDefenderAssessment.AccountDefenderLa" - + "bel\"\263\001\n\024AccountDefenderLabel\022&\n\"ACCOUNT_" - + "DEFENDER_LABEL_UNSPECIFIED\020\000\022\021\n\rPROFILE_" - + "MATCH\020\001\022\035\n\031SUSPICIOUS_LOGIN_ACTIVITY\020\002\022\037" - + "\n\033SUSPICIOUS_ACCOUNT_CREATION\020\003\022 \n\034RELAT" - + "ED_ACCOUNTS_NUMBER_HIGH\020\0042\315\004\n!RecaptchaE" - + "nterpriseServiceV1Beta1\022\335\001\n\020CreateAssess" - + "ment\022A.google.cloud.recaptchaenterprise." - + "v1beta1.CreateAssessmentRequest\0324.google" - + ".cloud.recaptchaenterprise.v1beta1.Asses" - + "sment\"P\332A\021parent,assessment\202\323\344\223\0026\"(/v1be" - + "ta1/{parent=projects/*}/assessments:\nass" - + "essment\022\357\001\n\022AnnotateAssessment\022C.google." - + "cloud.recaptchaenterprise.v1beta1.Annota" - + "teAssessmentRequest\032D.google.cloud.recap" - + "tchaenterprise.v1beta1.AnnotateAssessmen" - + "tResponse\"N\332A\017name,annotation\202\323\344\223\0026\"1/v1" - + "beta1/{name=projects/*/assessments/*}:an" - + "notate:\001*\032V\312A\"recaptchaenterprise.google" - + "apis.com\322A.https://www.googleapis.com/au" - + "th/cloud-platformB\262\002\n&com.google.recaptc" - + "haenterprise.v1beta1B\030RecaptchaEnterpris" - + "eProtoP\001Zacloud.google.com/go/recaptchae" - + "nterprise/v2/apiv1beta1/recaptchaenterpr" - + "isepb;recaptchaenterprisepb\242\002\004GCRE\252\002(Goo" - + "gle.Cloud.RecaptchaEnterprise.V1Beta1\312\002(" - + "Google\\Cloud\\RecaptchaEnterprise\\V1beta1" - + "\352\002+Google::Cloud::RecaptchaEnterprise::V" - + "1beta1b\006proto3" + + "nAssessment.CardTestingVerdict\022|\n\030behavi" + + "oral_trust_verdict\030\004 \001(\0132Z.google.cloud." + + "recaptchaenterprise.v1beta1.FraudPrevent" + + "ionAssessment.BehavioralTrustVerdict\032\'\n\027" + + "StolenInstrumentVerdict\022\014\n\004risk\030\001 \001(\002\032\"\n" + + "\022CardTestingVerdict\022\014\n\004risk\030\001 \001(\002\032\'\n\026Beh" + + "avioralTrustVerdict\022\r\n\005trust\030\001 \001(\002\"\273\002\n\031A" + + "ccountDefenderAssessment\022h\n\006labels\030\001 \003(\016" + + "2X.google.cloud.recaptchaenterprise.v1be" + + "ta1.AccountDefenderAssessment.AccountDef" + + "enderLabel\"\263\001\n\024AccountDefenderLabel\022&\n\"A" + + "CCOUNT_DEFENDER_LABEL_UNSPECIFIED\020\000\022\021\n\rP" + + "ROFILE_MATCH\020\001\022\035\n\031SUSPICIOUS_LOGIN_ACTIV" + + "ITY\020\002\022\037\n\033SUSPICIOUS_ACCOUNT_CREATION\020\003\022 " + + "\n\034RELATED_ACCOUNTS_NUMBER_HIGH\020\0042\315\004\n!Rec" + + "aptchaEnterpriseServiceV1Beta1\022\335\001\n\020Creat" + + "eAssessment\022A.google.cloud.recaptchaente" + + "rprise.v1beta1.CreateAssessmentRequest\0324" + + ".google.cloud.recaptchaenterprise.v1beta" + + "1.Assessment\"P\332A\021parent,assessment\202\323\344\223\0026" + + "\"(/v1beta1/{parent=projects/*}/assessmen" + + "ts:\nassessment\022\357\001\n\022AnnotateAssessment\022C." + + "google.cloud.recaptchaenterprise.v1beta1" + + ".AnnotateAssessmentRequest\032D.google.clou" + + "d.recaptchaenterprise.v1beta1.AnnotateAs" + + "sessmentResponse\"N\332A\017name,annotation\202\323\344\223" + + "\0026\"1/v1beta1/{name=projects/*/assessment" + + "s/*}:annotate:\001*\032V\312A\"recaptchaenterprise" + + ".googleapis.com\322A.https://www.googleapis" + + ".com/auth/cloud-platformB\262\002\n&com.google." + + "recaptchaenterprise.v1beta1B\030RecaptchaEn" + + "terpriseProtoP\001Zacloud.google.com/go/rec" + + "aptchaenterprise/v2/apiv1beta1/recaptcha" + + "enterprisepb;recaptchaenterprisepb\242\002\004GCR" + + "E\252\002(Google.Cloud.RecaptchaEnterprise.V1B" + + "eta1\312\002(Google\\Cloud\\RecaptchaEnterprise\\" + + "V1beta1\352\002+Google::Cloud::RecaptchaEnterp" + + "rise::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -422,7 +430,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_descriptor, new java.lang.String[] { - "TransactionRisk", "StolenInstrumentVerdict", "CardTestingVerdict", + "TransactionRisk", + "StolenInstrumentVerdict", + "CardTestingVerdict", + "BehavioralTrustVerdict", }); internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_StolenInstrumentVerdict_descriptor = internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_descriptor @@ -444,6 +455,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Risk", }); + internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor = + internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_recaptchaenterprise_v1beta1_FraudPreventionAssessment_BehavioralTrustVerdict_descriptor, + new java.lang.String[] { + "Trust", + }); internal_static_google_cloud_recaptchaenterprise_v1beta1_AccountDefenderAssessment_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_recaptchaenterprise_v1beta1_AccountDefenderAssessment_fieldAccessorTable = diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto index 8d44b92e4118..40f2ef8fa2e2 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto @@ -61,7 +61,7 @@ service RecaptchaEnterpriseServiceV1Beta1 { // The create assessment request message. message CreateAssessmentRequest { // Required. The name of the project in which the assessment will be created, - // in the format "projects/{project_number}". + // in the format `projects/{project_number}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -282,7 +282,7 @@ message AnnotateAssessmentRequest { } // Required. The resource name of the Assessment, in the format - // "projects/{project_number}/assessments/{assessment_id}". + // `projects/{project_number}/assessments/{assessment_id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -368,7 +368,7 @@ message Assessment { } // Output only. The resource name for the Assessment in the format - // "projects/{project_number}/assessments/{assessment_id}". + // `projects/{project_number}/assessments/{assessment_id}`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // The event being assessed. @@ -641,6 +641,13 @@ message FraudPreventionAssessment { float risk = 1; } + // Information about behavioral trust of the transaction. + message BehavioralTrustVerdict { + // Probability (0-1) of this transaction attempt being executed in a + // behaviorally trustworthy way. + float trust = 1; + } + // Probability (0-1) of this transaction being fraudulent. Summarizes the // combined risk of attack vectors below. float transaction_risk = 1; @@ -651,6 +658,9 @@ message FraudPreventionAssessment { // Assessment of this transaction for risk of being part of a card testing // attack. CardTestingVerdict card_testing_verdict = 3; + + // Assessment of this transaction for behavioral trust. + BehavioralTrustVerdict behavioral_trust_verdict = 4; } // Account defender risk assessment. diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/AsyncCreateFirewallPolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/AsyncCreateFirewallPolicy.java new file mode 100644 index 000000000000..85c4a6636ec2 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/AsyncCreateFirewallPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.ProjectName; + +public class AsyncCreateFirewallPolicy { + + public static void main(String[] args) throws Exception { + asyncCreateFirewallPolicy(); + } + + public static void asyncCreateFirewallPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + CreateFirewallPolicyRequest request = + CreateFirewallPolicyRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setFirewallPolicy(FirewallPolicy.newBuilder().build()) + .build(); + ApiFuture future = + recaptchaEnterpriseServiceClient.createFirewallPolicyCallable().futureCall(request); + // Do something. + FirewallPolicy response = future.get(); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_async] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicy.java new file mode 100644 index 000000000000..34ba11169906 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.CreateFirewallPolicyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.ProjectName; + +public class SyncCreateFirewallPolicy { + + public static void main(String[] args) throws Exception { + syncCreateFirewallPolicy(); + } + + public static void syncCreateFirewallPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + CreateFirewallPolicyRequest request = + CreateFirewallPolicyRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setFirewallPolicy(FirewallPolicy.newBuilder().build()) + .build(); + FirewallPolicy response = recaptchaEnterpriseServiceClient.createFirewallPolicy(request); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicyProjectnameFirewallpolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicyProjectnameFirewallpolicy.java new file mode 100644 index 000000000000..fbe0a3e88459 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicyProjectnameFirewallpolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_ProjectnameFirewallpolicy_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.ProjectName; + +public class SyncCreateFirewallPolicyProjectnameFirewallpolicy { + + public static void main(String[] args) throws Exception { + syncCreateFirewallPolicyProjectnameFirewallpolicy(); + } + + public static void syncCreateFirewallPolicyProjectnameFirewallpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build(); + FirewallPolicy response = + recaptchaEnterpriseServiceClient.createFirewallPolicy(parent, firewallPolicy); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_ProjectnameFirewallpolicy_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicyStringFirewallpolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicyStringFirewallpolicy.java new file mode 100644 index 000000000000..2b393f61db5c --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/createfirewallpolicy/SyncCreateFirewallPolicyStringFirewallpolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_StringFirewallpolicy_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.ProjectName; + +public class SyncCreateFirewallPolicyStringFirewallpolicy { + + public static void main(String[] args) throws Exception { + syncCreateFirewallPolicyStringFirewallpolicy(); + } + + public static void syncCreateFirewallPolicyStringFirewallpolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build(); + FirewallPolicy response = + recaptchaEnterpriseServiceClient.createFirewallPolicy(parent, firewallPolicy); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateFirewallPolicy_StringFirewallpolicy_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/AsyncDeleteFirewallPolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/AsyncDeleteFirewallPolicy.java new file mode 100644 index 000000000000..2995cecefe11 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/AsyncDeleteFirewallPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.protobuf.Empty; +import com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; + +public class AsyncDeleteFirewallPolicy { + + public static void main(String[] args) throws Exception { + asyncDeleteFirewallPolicy(); + } + + public static void asyncDeleteFirewallPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + DeleteFirewallPolicyRequest request = + DeleteFirewallPolicyRequest.newBuilder() + .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString()) + .build(); + ApiFuture future = + recaptchaEnterpriseServiceClient.deleteFirewallPolicyCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_async] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicy.java new file mode 100644 index 000000000000..882b08266d0c --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.protobuf.Empty; +import com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; + +public class SyncDeleteFirewallPolicy { + + public static void main(String[] args) throws Exception { + syncDeleteFirewallPolicy(); + } + + public static void syncDeleteFirewallPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + DeleteFirewallPolicyRequest request = + DeleteFirewallPolicyRequest.newBuilder() + .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString()) + .build(); + recaptchaEnterpriseServiceClient.deleteFirewallPolicy(request); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicyFirewallpolicyname.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicyFirewallpolicyname.java new file mode 100644 index 000000000000..27748fb7600f --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicyFirewallpolicyname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_Firewallpolicyname_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.protobuf.Empty; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; + +public class SyncDeleteFirewallPolicyFirewallpolicyname { + + public static void main(String[] args) throws Exception { + syncDeleteFirewallPolicyFirewallpolicyname(); + } + + public static void syncDeleteFirewallPolicyFirewallpolicyname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + FirewallPolicyName name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]"); + recaptchaEnterpriseServiceClient.deleteFirewallPolicy(name); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_Firewallpolicyname_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicyString.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicyString.java new file mode 100644 index 000000000000..8798362dd525 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/deletefirewallpolicy/SyncDeleteFirewallPolicyString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_String_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.protobuf.Empty; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; + +public class SyncDeleteFirewallPolicyString { + + public static void main(String[] args) throws Exception { + syncDeleteFirewallPolicyString(); + } + + public static void syncDeleteFirewallPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + String name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString(); + recaptchaEnterpriseServiceClient.deleteFirewallPolicy(name); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteFirewallPolicy_String_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/AsyncGetFirewallPolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/AsyncGetFirewallPolicy.java new file mode 100644 index 000000000000..f72782a96b2e --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/AsyncGetFirewallPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; +import com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest; + +public class AsyncGetFirewallPolicy { + + public static void main(String[] args) throws Exception { + asyncGetFirewallPolicy(); + } + + public static void asyncGetFirewallPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + GetFirewallPolicyRequest request = + GetFirewallPolicyRequest.newBuilder() + .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString()) + .build(); + ApiFuture future = + recaptchaEnterpriseServiceClient.getFirewallPolicyCallable().futureCall(request); + // Do something. + FirewallPolicy response = future.get(); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_async] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicy.java new file mode 100644 index 000000000000..223c7ac4dfdc --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; +import com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest; + +public class SyncGetFirewallPolicy { + + public static void main(String[] args) throws Exception { + syncGetFirewallPolicy(); + } + + public static void syncGetFirewallPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + GetFirewallPolicyRequest request = + GetFirewallPolicyRequest.newBuilder() + .setName(FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString()) + .build(); + FirewallPolicy response = recaptchaEnterpriseServiceClient.getFirewallPolicy(request); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicyFirewallpolicyname.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicyFirewallpolicyname.java new file mode 100644 index 000000000000..42ebf2c06190 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicyFirewallpolicyname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_Firewallpolicyname_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; + +public class SyncGetFirewallPolicyFirewallpolicyname { + + public static void main(String[] args) throws Exception { + syncGetFirewallPolicyFirewallpolicyname(); + } + + public static void syncGetFirewallPolicyFirewallpolicyname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + FirewallPolicyName name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]"); + FirewallPolicy response = recaptchaEnterpriseServiceClient.getFirewallPolicy(name); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_Firewallpolicyname_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicyString.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicyString.java new file mode 100644 index 000000000000..c0d46c46009c --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/getfirewallpolicy/SyncGetFirewallPolicyString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_String_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.FirewallPolicyName; + +public class SyncGetFirewallPolicyString { + + public static void main(String[] args) throws Exception { + syncGetFirewallPolicyString(); + } + + public static void syncGetFirewallPolicyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + String name = FirewallPolicyName.of("[PROJECT]", "[FIREWALLPOLICY]").toString(); + FirewallPolicy response = recaptchaEnterpriseServiceClient.getFirewallPolicy(name); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetFirewallPolicy_String_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/AsyncListFirewallPolicies.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/AsyncListFirewallPolicies.java new file mode 100644 index 000000000000..d894100b461b --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/AsyncListFirewallPolicies.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ProjectName; + +public class AsyncListFirewallPolicies { + + public static void main(String[] args) throws Exception { + asyncListFirewallPolicies(); + } + + public static void asyncListFirewallPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + ListFirewallPoliciesRequest request = + ListFirewallPoliciesRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + recaptchaEnterpriseServiceClient.listFirewallPoliciesPagedCallable().futureCall(request); + // Do something. + for (FirewallPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_async] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/AsyncListFirewallPoliciesPaged.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/AsyncListFirewallPoliciesPaged.java new file mode 100644 index 000000000000..bb6b9aa300c6 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/AsyncListFirewallPoliciesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_Paged_async] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.common.base.Strings; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesResponse; +import com.google.recaptchaenterprise.v1.ProjectName; + +public class AsyncListFirewallPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncListFirewallPoliciesPaged(); + } + + public static void asyncListFirewallPoliciesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + ListFirewallPoliciesRequest request = + ListFirewallPoliciesRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListFirewallPoliciesResponse response = + recaptchaEnterpriseServiceClient.listFirewallPoliciesCallable().call(request); + for (FirewallPolicy element : response.getFirewallPoliciesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_Paged_async] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPolicies.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPolicies.java new file mode 100644 index 000000000000..d3eb721b08ab --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPolicies.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.ListFirewallPoliciesRequest; +import com.google.recaptchaenterprise.v1.ProjectName; + +public class SyncListFirewallPolicies { + + public static void main(String[] args) throws Exception { + syncListFirewallPolicies(); + } + + public static void syncListFirewallPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + ListFirewallPoliciesRequest request = + ListFirewallPoliciesRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (FirewallPolicy element : + recaptchaEnterpriseServiceClient.listFirewallPolicies(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPoliciesProjectname.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPoliciesProjectname.java new file mode 100644 index 000000000000..8dd83bf6c852 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPoliciesProjectname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_Projectname_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.ProjectName; + +public class SyncListFirewallPoliciesProjectname { + + public static void main(String[] args) throws Exception { + syncListFirewallPoliciesProjectname(); + } + + public static void syncListFirewallPoliciesProjectname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + for (FirewallPolicy element : + recaptchaEnterpriseServiceClient.listFirewallPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_Projectname_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPoliciesString.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPoliciesString.java new file mode 100644 index 000000000000..8abb73487455 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/listfirewallpolicies/SyncListFirewallPoliciesString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_String_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.ProjectName; + +public class SyncListFirewallPoliciesString { + + public static void main(String[] args) throws Exception { + syncListFirewallPoliciesString(); + } + + public static void syncListFirewallPoliciesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + for (FirewallPolicy element : + recaptchaEnterpriseServiceClient.listFirewallPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListFirewallPolicies_String_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/AsyncUpdateFirewallPolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/AsyncUpdateFirewallPolicy.java new file mode 100644 index 000000000000..58eb87ef121c --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/AsyncUpdateFirewallPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.protobuf.FieldMask; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest; + +public class AsyncUpdateFirewallPolicy { + + public static void main(String[] args) throws Exception { + asyncUpdateFirewallPolicy(); + } + + public static void asyncUpdateFirewallPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + UpdateFirewallPolicyRequest request = + UpdateFirewallPolicyRequest.newBuilder() + .setFirewallPolicy(FirewallPolicy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + recaptchaEnterpriseServiceClient.updateFirewallPolicyCallable().futureCall(request); + // Do something. + FirewallPolicy response = future.get(); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_async] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/SyncUpdateFirewallPolicy.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/SyncUpdateFirewallPolicy.java new file mode 100644 index 000000000000..d54032e1b192 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/SyncUpdateFirewallPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.protobuf.FieldMask; +import com.google.recaptchaenterprise.v1.FirewallPolicy; +import com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest; + +public class SyncUpdateFirewallPolicy { + + public static void main(String[] args) throws Exception { + syncUpdateFirewallPolicy(); + } + + public static void syncUpdateFirewallPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + UpdateFirewallPolicyRequest request = + UpdateFirewallPolicyRequest.newBuilder() + .setFirewallPolicy(FirewallPolicy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + FirewallPolicy response = recaptchaEnterpriseServiceClient.updateFirewallPolicy(request); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_sync] diff --git a/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/SyncUpdateFirewallPolicyFirewallpolicyFieldmask.java b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/SyncUpdateFirewallPolicyFirewallpolicyFieldmask.java new file mode 100644 index 000000000000..0015ad5efed7 --- /dev/null +++ b/java-recaptchaenterprise/samples/snippets/generated/com/google/cloud/recaptchaenterprise/v1/recaptchaenterpriseservice/updatefirewallpolicy/SyncUpdateFirewallPolicyFirewallpolicyFieldmask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.recaptchaenterprise.v1.samples; + +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_FirewallpolicyFieldmask_sync] +import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; +import com.google.protobuf.FieldMask; +import com.google.recaptchaenterprise.v1.FirewallPolicy; + +public class SyncUpdateFirewallPolicyFirewallpolicyFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateFirewallPolicyFirewallpolicyFieldmask(); + } + + public static void syncUpdateFirewallPolicyFirewallpolicyFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = + RecaptchaEnterpriseServiceClient.create()) { + FirewallPolicy firewallPolicy = FirewallPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + FirewallPolicy response = + recaptchaEnterpriseServiceClient.updateFirewallPolicy(firewallPolicy, updateMask); + } + } +} +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateFirewallPolicy_FirewallpolicyFieldmask_sync]