Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [recaptchaenterprise] add reCAPTCHA Enterprise Fraud Prevention API #9241

Merged
merged 2 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions java-recaptchaenterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The client application making API calls must be granted [authorization scopes][a
You will need a [Google Cloud Platform Console][developer-console] project with the reCAPTCHA Enterprise [API enabled][enable-api].

[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line:
[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:
`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.

### Installation and setup
Expand Down Expand Up @@ -171,14 +171,14 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-recaptchaenterprise.svg
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-recaptchaenterprise&core=gav
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recaptchaenterprise/3.9.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy
[developer-console]: https://console.developers.google.com/
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[cloud-cli]: https://cloud.google.com/cli
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ public final AnnotateAssessmentResponse annotateAssessment(
* .setName(AssessmentName.of("[PROJECT]", "[ASSESSMENT]").toString())
* .addAllReasons(new ArrayList<AnnotateAssessmentRequest.Reason>())
* .setHashedAccountId(ByteString.EMPTY)
* .setTransactionEvent(TransactionEvent.newBuilder().build())
* .build();
* AnnotateAssessmentResponse response =
* recaptchaEnterpriseServiceV1Beta1Client.annotateAssessment(request);
Expand Down Expand Up @@ -440,6 +441,7 @@ public final AnnotateAssessmentResponse annotateAssessment(AnnotateAssessmentReq
* .setName(AssessmentName.of("[PROJECT]", "[ASSESSMENT]").toString())
* .addAllReasons(new ArrayList<AnnotateAssessmentRequest.Reason>())
* .setHashedAccountId(ByteString.EMPTY)
* .setTransactionEvent(TransactionEvent.newBuilder().build())
* .build();
* ApiFuture<AnnotateAssessmentResponse> future =
* recaptchaEnterpriseServiceV1Beta1Client.annotateAssessmentCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.google.recaptchaenterprise.v1beta1.Assessment;
import com.google.recaptchaenterprise.v1beta1.AssessmentName;
import com.google.recaptchaenterprise.v1beta1.Event;
import com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment;
import com.google.recaptchaenterprise.v1beta1.PasswordLeakVerification;
import com.google.recaptchaenterprise.v1beta1.ProjectName;
import com.google.recaptchaenterprise.v1beta1.TokenProperties;
Expand Down Expand Up @@ -92,6 +93,7 @@ public void createAssessmentTest() throws Exception {
.addAllReasons(new ArrayList<Assessment.ClassificationReason>())
.setPasswordLeakVerification(PasswordLeakVerification.newBuilder().build())
.setAccountDefenderAssessment(AccountDefenderAssessment.newBuilder().build())
.setFraudPreventionAssessment(FraudPreventionAssessment.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -144,6 +146,7 @@ public void createAssessmentTest2() throws Exception {
.addAllReasons(new ArrayList<Assessment.ClassificationReason>())
.setPasswordLeakVerification(PasswordLeakVerification.newBuilder().build())
.setAccountDefenderAssessment(AccountDefenderAssessment.newBuilder().build())
.setFraudPreventionAssessment(FraudPreventionAssessment.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.google.recaptchaenterprise.v1beta1.AssessmentName;
import com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest;
import com.google.recaptchaenterprise.v1beta1.Event;
import com.google.recaptchaenterprise.v1beta1.FraudPreventionAssessment;
import com.google.recaptchaenterprise.v1beta1.PasswordLeakVerification;
import com.google.recaptchaenterprise.v1beta1.ProjectName;
import com.google.recaptchaenterprise.v1beta1.TokenProperties;
Expand Down Expand Up @@ -98,6 +99,7 @@ public void createAssessmentTest() throws Exception {
.addAllReasons(new ArrayList<Assessment.ClassificationReason>())
.setPasswordLeakVerification(PasswordLeakVerification.newBuilder().build())
.setAccountDefenderAssessment(AccountDefenderAssessment.newBuilder().build())
.setFraudPreventionAssessment(FraudPreventionAssessment.newBuilder().build())
.build();
mockRecaptchaEnterpriseServiceV1Beta1.addResponse(expectedResponse);

Expand Down Expand Up @@ -145,6 +147,7 @@ public void createAssessmentTest2() throws Exception {
.addAllReasons(new ArrayList<Assessment.ClassificationReason>())
.setPasswordLeakVerification(PasswordLeakVerification.newBuilder().build())
.setAccountDefenderAssessment(AccountDefenderAssessment.newBuilder().build())
.setFraudPreventionAssessment(FraudPreventionAssessment.newBuilder().build())
.build();
mockRecaptchaEnterpriseServiceV1Beta1.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
*
* <pre>
* Account Defender risk assessment.
* Account defender risk assessment.
* </pre>
*
* Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment}
Expand Down Expand Up @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* Labels returned by Account Defender for this request.
* Labels returned by account defender for this request.
* </pre>
*
* Protobuf enum {@code
Expand Down Expand Up @@ -584,7 +584,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
* <pre>
* Account Defender risk assessment.
* Account defender risk assessment.
* </pre>
*
* Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment}
Expand Down
Loading