forked from googleapis/google-cloud-java
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: set the right field number for reCAPTCHA private password leak (g…
…oogleapis#819) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 455215317 Source-Link: googleapis/googleapis@ec8056e Source-Link: https://github.com/googleapis/googleapis-gen/commit/8084ad71ff90f4af666052e46bb955b8e555d4bf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODA4NGFkNzFmZjkwZjRhZjY2NjA1MmU0NmJiOTU1YjhlNTU1ZDRiZiJ9
- Loading branch information
1 parent
eb3b703
commit bb2c0ae
Showing
60 changed files
with
2,753 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...prise/v1/recaptchaenterpriseserviceclient/annotateassessment/AsyncAnnotateAssessment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.recaptchaenterprise.v1.samples; | ||
|
||
// [START | ||
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_async] | ||
import com.google.api.core.ApiFuture; | ||
import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; | ||
import com.google.protobuf.ByteString; | ||
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest; | ||
import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse; | ||
import com.google.recaptchaenterprise.v1.AssessmentName; | ||
import java.util.ArrayList; | ||
|
||
public class AsyncAnnotateAssessment { | ||
|
||
public static void main(String[] args) throws Exception { | ||
asyncAnnotateAssessment(); | ||
} | ||
|
||
public static void asyncAnnotateAssessment() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = | ||
RecaptchaEnterpriseServiceClient.create()) { | ||
AnnotateAssessmentRequest request = | ||
AnnotateAssessmentRequest.newBuilder() | ||
.setName(AssessmentName.of("[PROJECT]", "[ASSESSMENT]").toString()) | ||
.addAllReasons(new ArrayList<AnnotateAssessmentRequest.Reason>()) | ||
.setHashedAccountId(ByteString.EMPTY) | ||
.build(); | ||
ApiFuture<AnnotateAssessmentResponse> future = | ||
recaptchaEnterpriseServiceClient.annotateAssessmentCallable().futureCall(request); | ||
// Do something. | ||
AnnotateAssessmentResponse response = future.get(); | ||
} | ||
} | ||
} | ||
// [END recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_async] |
49 changes: 49 additions & 0 deletions
49
...rprise/v1/recaptchaenterpriseserviceclient/annotateassessment/SyncAnnotateAssessment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.recaptchaenterprise.v1.samples; | ||
|
||
// [START recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_sync] | ||
import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; | ||
import com.google.protobuf.ByteString; | ||
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest; | ||
import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse; | ||
import com.google.recaptchaenterprise.v1.AssessmentName; | ||
import java.util.ArrayList; | ||
|
||
public class SyncAnnotateAssessment { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncAnnotateAssessment(); | ||
} | ||
|
||
public static void syncAnnotateAssessment() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = | ||
RecaptchaEnterpriseServiceClient.create()) { | ||
AnnotateAssessmentRequest request = | ||
AnnotateAssessmentRequest.newBuilder() | ||
.setName(AssessmentName.of("[PROJECT]", "[ASSESSMENT]").toString()) | ||
.addAllReasons(new ArrayList<AnnotateAssessmentRequest.Reason>()) | ||
.setHashedAccountId(ByteString.EMPTY) | ||
.build(); | ||
AnnotateAssessmentResponse response = | ||
recaptchaEnterpriseServiceClient.annotateAssessment(request); | ||
} | ||
} | ||
} | ||
// [END recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_sync] |
47 changes: 47 additions & 0 deletions
47
...teassessment/SyncAnnotateAssessmentAssessmentnameAnnotateassessmentrequestannotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.recaptchaenterprise.v1.samples; | ||
|
||
// [START | ||
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_assessmentnameannotateassessmentrequestannotation_sync] | ||
import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; | ||
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest; | ||
import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse; | ||
import com.google.recaptchaenterprise.v1.AssessmentName; | ||
|
||
public class SyncAnnotateAssessmentAssessmentnameAnnotateassessmentrequestannotation { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncAnnotateAssessmentAssessmentnameAnnotateassessmentrequestannotation(); | ||
} | ||
|
||
public static void syncAnnotateAssessmentAssessmentnameAnnotateassessmentrequestannotation() | ||
throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = | ||
RecaptchaEnterpriseServiceClient.create()) { | ||
AssessmentName name = AssessmentName.of("[PROJECT]", "[ASSESSMENT]"); | ||
AnnotateAssessmentRequest.Annotation annotation = | ||
AnnotateAssessmentRequest.Annotation.forNumber(0); | ||
AnnotateAssessmentResponse response = | ||
recaptchaEnterpriseServiceClient.annotateAssessment(name, annotation); | ||
} | ||
} | ||
} | ||
// [END | ||
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_assessmentnameannotateassessmentrequestannotation_sync] |
47 changes: 47 additions & 0 deletions
47
...t/annotateassessment/SyncAnnotateAssessmentStringAnnotateassessmentrequestannotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.recaptchaenterprise.v1.samples; | ||
|
||
// [START | ||
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_stringannotateassessmentrequestannotation_sync] | ||
import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient; | ||
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest; | ||
import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse; | ||
import com.google.recaptchaenterprise.v1.AssessmentName; | ||
|
||
public class SyncAnnotateAssessmentStringAnnotateassessmentrequestannotation { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncAnnotateAssessmentStringAnnotateassessmentrequestannotation(); | ||
} | ||
|
||
public static void syncAnnotateAssessmentStringAnnotateassessmentrequestannotation() | ||
throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = | ||
RecaptchaEnterpriseServiceClient.create()) { | ||
String name = AssessmentName.of("[PROJECT]", "[ASSESSMENT]").toString(); | ||
AnnotateAssessmentRequest.Annotation annotation = | ||
AnnotateAssessmentRequest.Annotation.forNumber(0); | ||
AnnotateAssessmentResponse response = | ||
recaptchaEnterpriseServiceClient.annotateAssessment(name, annotation); | ||
} | ||
} | ||
} | ||
// [END | ||
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_stringannotateassessmentrequestannotation_sync] |
Oops, something went wrong.