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 Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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.
+ *
+ * {@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.
+ *
+ * {@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.
+ *
+ * {@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
+ */
+ public final UnaryCallable{@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.
+ *
+ * {@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.
+ *
+ * {@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.
+ *
+ * {@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
+ */
+ public final UnaryCallable{@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{@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.
+ *
+ * {@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.
+ *
+ * {@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.
+ *
+ * {@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
+ */
+ public final UnaryCallable{@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.
+ *
+ * {@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.
+ *
+ * {@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
+ */
+ public final UnaryCallable{@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.
+ *
+ * {@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.
+ *
+ * {@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.
+ *
+ * {@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
+ */
+ public final UnaryCallable
+ * 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
+ * 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
+ * Returns the specified firewall policy.
+ *
+ */
+ default void getFirewallPolicy(
+ com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest request,
+ io.grpc.stub.StreamObserver
+ * Updates the specified firewall policy.
+ *
+ */
+ default void updateFirewallPolicy(
+ com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest request,
+ io.grpc.stub.StreamObserver
+ * Deletes the specified firewall policy.
+ *
+ */
+ default void deleteFirewallPolicy(
+ com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest request,
+ io.grpc.stub.StreamObserver
+ * 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
+ * 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
+ * Returns the specified firewall policy.
+ *
+ */
+ public void getFirewallPolicy(
+ com.google.recaptchaenterprise.v1.GetFirewallPolicyRequest request,
+ io.grpc.stub.StreamObserver
+ * Updates the specified firewall policy.
+ *
+ */
+ public void updateFirewallPolicy(
+ com.google.recaptchaenterprise.v1.UpdateFirewallPolicyRequest request,
+ io.grpc.stub.StreamObserver
+ * Deletes the specified firewall policy.
+ *
+ */
+ public void deleteFirewallPolicy(
+ com.google.recaptchaenterprise.v1.DeleteFirewallPolicyRequest request,
+ io.grpc.stub.StreamObserver
+ * 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
+ * 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.ListenableFuturestring 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;
+
+/**
+ *
+ *
+ *
*/
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_;
+ /**
+ *
+ *
+ *
+ * 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
+ * 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
+ * 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(
*
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
*
*
*/
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();
+ /**
+ *
+ *
+ *
* 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;
+ /**
+ *
+ *
+ *
*/
public Builder clearTransactionData() {
- bitField0_ = (bitField0_ & ~0x00000040);
+ bitField0_ = (bitField0_ & ~0x00001000);
transactionData_ = null;
if (transactionDataBuilder_ != null) {
transactionDataBuilder_.dispose();
@@ -1688,7 +2632,7 @@ public Builder clearTransactionData() {
*
+ * 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
+ * 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
*
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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 extends com.google.recaptchaenterprise.v1.FirewallActionOrBuilder>
+ 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
+ * 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
+ * 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
+ * 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 extends com.google.recaptchaenterprise.v1.FirewallAction> 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 extends com.google.recaptchaenterprise.v1.FirewallActionOrBuilder>
+ 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
+ * 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
+ * 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