Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 02bac15

Browse files
fix!: set the right field number for reCAPTCHA private password leak (#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
1 parent 6203f88 commit 02bac15

File tree

60 files changed

+2753
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2753
-21
lines changed

proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/Assessment.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private Assessment(
143143

144144
break;
145145
}
146-
case 58:
146+
case 66:
147147
{
148148
com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerification.Builder subBuilder =
149149
null;
@@ -461,7 +461,7 @@ public boolean hasAccountDefenderAssessment() {
461461
return getAccountDefenderAssessment();
462462
}
463463

464-
public static final int PRIVATE_PASSWORD_LEAK_VERIFICATION_FIELD_NUMBER = 7;
464+
public static final int PRIVATE_PASSWORD_LEAK_VERIFICATION_FIELD_NUMBER = 8;
465465
private com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerification
466466
privatePasswordLeakVerification_;
467467
/**
@@ -472,7 +472,7 @@ public boolean hasAccountDefenderAssessment() {
472472
* </pre>
473473
*
474474
* <code>
475-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
475+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
476476
* </code>
477477
*
478478
* @return Whether the privatePasswordLeakVerification field is set.
@@ -489,7 +489,7 @@ public boolean hasPrivatePasswordLeakVerification() {
489489
* </pre>
490490
*
491491
* <code>
492-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
492+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
493493
* </code>
494494
*
495495
* @return The privatePasswordLeakVerification.
@@ -509,7 +509,7 @@ public boolean hasPrivatePasswordLeakVerification() {
509509
* </pre>
510510
*
511511
* <code>
512-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
512+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
513513
* </code>
514514
*/
515515
@java.lang.Override
@@ -548,7 +548,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
548548
output.writeMessage(6, getAccountDefenderAssessment());
549549
}
550550
if (privatePasswordLeakVerification_ != null) {
551-
output.writeMessage(7, getPrivatePasswordLeakVerification());
551+
output.writeMessage(8, getPrivatePasswordLeakVerification());
552552
}
553553
unknownFields.writeTo(output);
554554
}
@@ -579,7 +579,7 @@ public int getSerializedSize() {
579579
if (privatePasswordLeakVerification_ != null) {
580580
size +=
581581
com.google.protobuf.CodedOutputStream.computeMessageSize(
582-
7, getPrivatePasswordLeakVerification());
582+
8, getPrivatePasswordLeakVerification());
583583
}
584584
size += unknownFields.getSerializedSize();
585585
memoizedSize = size;
@@ -1920,7 +1920,7 @@ public Builder clearAccountDefenderAssessment() {
19201920
* </pre>
19211921
*
19221922
* <code>
1923-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
1923+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
19241924
* </code>
19251925
*
19261926
* @return Whether the privatePasswordLeakVerification field is set.
@@ -1937,7 +1937,7 @@ public boolean hasPrivatePasswordLeakVerification() {
19371937
* </pre>
19381938
*
19391939
* <code>
1940-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
1940+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
19411941
* </code>
19421942
*
19431943
* @return The privatePasswordLeakVerification.
@@ -1960,7 +1960,7 @@ public boolean hasPrivatePasswordLeakVerification() {
19601960
* </pre>
19611961
*
19621962
* <code>
1963-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
1963+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
19641964
* </code>
19651965
*/
19661966
public Builder setPrivatePasswordLeakVerification(
@@ -1985,7 +1985,7 @@ public Builder setPrivatePasswordLeakVerification(
19851985
* </pre>
19861986
*
19871987
* <code>
1988-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
1988+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
19891989
* </code>
19901990
*/
19911991
public Builder setPrivatePasswordLeakVerification(
@@ -2007,7 +2007,7 @@ public Builder setPrivatePasswordLeakVerification(
20072007
* </pre>
20082008
*
20092009
* <code>
2010-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
2010+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
20112011
* </code>
20122012
*/
20132013
public Builder mergePrivatePasswordLeakVerification(
@@ -2037,7 +2037,7 @@ public Builder mergePrivatePasswordLeakVerification(
20372037
* </pre>
20382038
*
20392039
* <code>
2040-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
2040+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
20412041
* </code>
20422042
*/
20432043
public Builder clearPrivatePasswordLeakVerification() {
@@ -2059,7 +2059,7 @@ public Builder clearPrivatePasswordLeakVerification() {
20592059
* </pre>
20602060
*
20612061
* <code>
2062-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
2062+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
20632063
* </code>
20642064
*/
20652065
public com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerification.Builder
@@ -2076,7 +2076,7 @@ public Builder clearPrivatePasswordLeakVerification() {
20762076
* </pre>
20772077
*
20782078
* <code>
2079-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
2079+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
20802080
* </code>
20812081
*/
20822082
public com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerificationOrBuilder
@@ -2097,7 +2097,7 @@ public Builder clearPrivatePasswordLeakVerification() {
20972097
* </pre>
20982098
*
20992099
* <code>
2100-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
2100+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
21012101
* </code>
21022102
*/
21032103
private com.google.protobuf.SingleFieldBuilderV3<

proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AssessmentOrBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public interface AssessmentOrBuilder
220220
* </pre>
221221
*
222222
* <code>
223-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
223+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
224224
* </code>
225225
*
226226
* @return Whether the privatePasswordLeakVerification field is set.
@@ -234,7 +234,7 @@ public interface AssessmentOrBuilder
234234
* </pre>
235235
*
236236
* <code>
237-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
237+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
238238
* </code>
239239
*
240240
* @return The privatePasswordLeakVerification.
@@ -249,7 +249,7 @@ public interface AssessmentOrBuilder
249249
* </pre>
250250
*
251251
* <code>
252-
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
252+
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
253253
* </code>
254254
*/
255255
com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerificationOrBuilder

proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/RecaptchaEnterpriseProto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
228228
+ "_assessment\030\006 \001(\0132>.google.cloud.recaptc"
229229
+ "haenterprise.v1.AccountDefenderAssessmen"
230230
+ "t\022p\n\"private_password_leak_verification\030"
231-
+ "\007 \001(\0132D.google.cloud.recaptchaenterprise"
231+
+ "\010 \001(\0132D.google.cloud.recaptchaenterprise"
232232
+ ".v1.PrivatePasswordLeakVerification:_\352A\\"
233233
+ "\n-recaptchaenterprise.googleapis.com/Ass"
234234
+ "essment\022+projects/{project}/assessments/"

proto-google-cloud-recaptchaenterprise-v1/src/main/proto/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ message Assessment {
287287
AccountDefenderAssessment account_defender_assessment = 6;
288288

289289
// Password leak verification info.
290-
PrivatePasswordLeakVerification private_password_leak_verification = 7;
290+
PrivatePasswordLeakVerification private_password_leak_verification = 8;
291291
}
292292

293293
message Event {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.recaptchaenterprise.v1.samples;
18+
19+
// [START
20+
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_async]
21+
import com.google.api.core.ApiFuture;
22+
import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient;
23+
import com.google.protobuf.ByteString;
24+
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest;
25+
import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse;
26+
import com.google.recaptchaenterprise.v1.AssessmentName;
27+
import java.util.ArrayList;
28+
29+
public class AsyncAnnotateAssessment {
30+
31+
public static void main(String[] args) throws Exception {
32+
asyncAnnotateAssessment();
33+
}
34+
35+
public static void asyncAnnotateAssessment() throws Exception {
36+
// This snippet has been automatically generated for illustrative purposes only.
37+
// It may require modifications to work in your environment.
38+
try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
39+
RecaptchaEnterpriseServiceClient.create()) {
40+
AnnotateAssessmentRequest request =
41+
AnnotateAssessmentRequest.newBuilder()
42+
.setName(AssessmentName.of("[PROJECT]", "[ASSESSMENT]").toString())
43+
.addAllReasons(new ArrayList<AnnotateAssessmentRequest.Reason>())
44+
.setHashedAccountId(ByteString.EMPTY)
45+
.build();
46+
ApiFuture<AnnotateAssessmentResponse> future =
47+
recaptchaEnterpriseServiceClient.annotateAssessmentCallable().futureCall(request);
48+
// Do something.
49+
AnnotateAssessmentResponse response = future.get();
50+
}
51+
}
52+
}
53+
// [END recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.recaptchaenterprise.v1.samples;
18+
19+
// [START recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_sync]
20+
import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient;
21+
import com.google.protobuf.ByteString;
22+
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest;
23+
import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse;
24+
import com.google.recaptchaenterprise.v1.AssessmentName;
25+
import java.util.ArrayList;
26+
27+
public class SyncAnnotateAssessment {
28+
29+
public static void main(String[] args) throws Exception {
30+
syncAnnotateAssessment();
31+
}
32+
33+
public static void syncAnnotateAssessment() throws Exception {
34+
// This snippet has been automatically generated for illustrative purposes only.
35+
// It may require modifications to work in your environment.
36+
try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
37+
RecaptchaEnterpriseServiceClient.create()) {
38+
AnnotateAssessmentRequest request =
39+
AnnotateAssessmentRequest.newBuilder()
40+
.setName(AssessmentName.of("[PROJECT]", "[ASSESSMENT]").toString())
41+
.addAllReasons(new ArrayList<AnnotateAssessmentRequest.Reason>())
42+
.setHashedAccountId(ByteString.EMPTY)
43+
.build();
44+
AnnotateAssessmentResponse response =
45+
recaptchaEnterpriseServiceClient.annotateAssessment(request);
46+
}
47+
}
48+
}
49+
// [END recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.recaptchaenterprise.v1.samples;
18+
19+
// [START
20+
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_assessmentnameannotateassessmentrequestannotation_sync]
21+
import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient;
22+
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest;
23+
import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse;
24+
import com.google.recaptchaenterprise.v1.AssessmentName;
25+
26+
public class SyncAnnotateAssessmentAssessmentnameAnnotateassessmentrequestannotation {
27+
28+
public static void main(String[] args) throws Exception {
29+
syncAnnotateAssessmentAssessmentnameAnnotateassessmentrequestannotation();
30+
}
31+
32+
public static void syncAnnotateAssessmentAssessmentnameAnnotateassessmentrequestannotation()
33+
throws Exception {
34+
// This snippet has been automatically generated for illustrative purposes only.
35+
// It may require modifications to work in your environment.
36+
try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
37+
RecaptchaEnterpriseServiceClient.create()) {
38+
AssessmentName name = AssessmentName.of("[PROJECT]", "[ASSESSMENT]");
39+
AnnotateAssessmentRequest.Annotation annotation =
40+
AnnotateAssessmentRequest.Annotation.forNumber(0);
41+
AnnotateAssessmentResponse response =
42+
recaptchaEnterpriseServiceClient.annotateAssessment(name, annotation);
43+
}
44+
}
45+
}
46+
// [END
47+
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_assessmentnameannotateassessmentrequestannotation_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.recaptchaenterprise.v1.samples;
18+
19+
// [START
20+
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_stringannotateassessmentrequestannotation_sync]
21+
import com.google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseServiceClient;
22+
import com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest;
23+
import com.google.recaptchaenterprise.v1.AnnotateAssessmentResponse;
24+
import com.google.recaptchaenterprise.v1.AssessmentName;
25+
26+
public class SyncAnnotateAssessmentStringAnnotateassessmentrequestannotation {
27+
28+
public static void main(String[] args) throws Exception {
29+
syncAnnotateAssessmentStringAnnotateassessmentrequestannotation();
30+
}
31+
32+
public static void syncAnnotateAssessmentStringAnnotateassessmentrequestannotation()
33+
throws Exception {
34+
// This snippet has been automatically generated for illustrative purposes only.
35+
// It may require modifications to work in your environment.
36+
try (RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient =
37+
RecaptchaEnterpriseServiceClient.create()) {
38+
String name = AssessmentName.of("[PROJECT]", "[ASSESSMENT]").toString();
39+
AnnotateAssessmentRequest.Annotation annotation =
40+
AnnotateAssessmentRequest.Annotation.forNumber(0);
41+
AnnotateAssessmentResponse response =
42+
recaptchaEnterpriseServiceClient.annotateAssessment(name, annotation);
43+
}
44+
}
45+
}
46+
// [END
47+
// recaptchaenterprise_v1_generated_recaptchaenterpriseserviceclient_annotateassessment_stringannotateassessmentrequestannotation_sync]

0 commit comments

Comments
 (0)