Skip to content

Commit

Permalink
fix!: set the right field number for reCAPTCHA private password leak (g…
Browse files Browse the repository at this point in the history
…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
gcf-owl-bot[bot] authored Jun 21, 2022
1 parent eb3b703 commit bb2c0ae
Show file tree
Hide file tree
Showing 60 changed files with 2,753 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private Assessment(

break;
}
case 58:
case 66:
{
com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerification.Builder subBuilder =
null;
Expand Down Expand Up @@ -461,7 +461,7 @@ public boolean hasAccountDefenderAssessment() {
return getAccountDefenderAssessment();
}

public static final int PRIVATE_PASSWORD_LEAK_VERIFICATION_FIELD_NUMBER = 7;
public static final int PRIVATE_PASSWORD_LEAK_VERIFICATION_FIELD_NUMBER = 8;
private com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerification
privatePasswordLeakVerification_;
/**
Expand All @@ -472,7 +472,7 @@ public boolean hasAccountDefenderAssessment() {
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*
* @return Whether the privatePasswordLeakVerification field is set.
Expand All @@ -489,7 +489,7 @@ public boolean hasPrivatePasswordLeakVerification() {
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*
* @return The privatePasswordLeakVerification.
Expand All @@ -509,7 +509,7 @@ public boolean hasPrivatePasswordLeakVerification() {
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*/
@java.lang.Override
Expand Down Expand Up @@ -548,7 +548,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
output.writeMessage(6, getAccountDefenderAssessment());
}
if (privatePasswordLeakVerification_ != null) {
output.writeMessage(7, getPrivatePasswordLeakVerification());
output.writeMessage(8, getPrivatePasswordLeakVerification());
}
unknownFields.writeTo(output);
}
Expand Down Expand Up @@ -579,7 +579,7 @@ public int getSerializedSize() {
if (privatePasswordLeakVerification_ != null) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
7, getPrivatePasswordLeakVerification());
8, getPrivatePasswordLeakVerification());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
Expand Down Expand Up @@ -1920,7 +1920,7 @@ public Builder clearAccountDefenderAssessment() {
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*
* @return Whether the privatePasswordLeakVerification field is set.
Expand All @@ -1937,7 +1937,7 @@ public boolean hasPrivatePasswordLeakVerification() {
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*
* @return The privatePasswordLeakVerification.
Expand All @@ -1960,7 +1960,7 @@ public boolean hasPrivatePasswordLeakVerification() {
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*/
public Builder setPrivatePasswordLeakVerification(
Expand All @@ -1985,7 +1985,7 @@ public Builder setPrivatePasswordLeakVerification(
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*/
public Builder setPrivatePasswordLeakVerification(
Expand All @@ -2007,7 +2007,7 @@ public Builder setPrivatePasswordLeakVerification(
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*/
public Builder mergePrivatePasswordLeakVerification(
Expand Down Expand Up @@ -2037,7 +2037,7 @@ public Builder mergePrivatePasswordLeakVerification(
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*/
public Builder clearPrivatePasswordLeakVerification() {
Expand All @@ -2059,7 +2059,7 @@ public Builder clearPrivatePasswordLeakVerification() {
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*/
public com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerification.Builder
Expand All @@ -2076,7 +2076,7 @@ public Builder clearPrivatePasswordLeakVerification() {
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*/
public com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerificationOrBuilder
Expand All @@ -2097,7 +2097,7 @@ public Builder clearPrivatePasswordLeakVerification() {
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public interface AssessmentOrBuilder
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*
* @return Whether the privatePasswordLeakVerification field is set.
Expand All @@ -234,7 +234,7 @@ public interface AssessmentOrBuilder
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*
* @return The privatePasswordLeakVerification.
Expand All @@ -249,7 +249,7 @@ public interface AssessmentOrBuilder
* </pre>
*
* <code>
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 7;
* .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8;
* </code>
*/
com.google.recaptchaenterprise.v1.PrivatePasswordLeakVerificationOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "_assessment\030\006 \001(\0132>.google.cloud.recaptc"
+ "haenterprise.v1.AccountDefenderAssessmen"
+ "t\022p\n\"private_password_leak_verification\030"
+ "\007 \001(\0132D.google.cloud.recaptchaenterprise"
+ "\010 \001(\0132D.google.cloud.recaptchaenterprise"
+ ".v1.PrivatePasswordLeakVerification:_\352A\\"
+ "\n-recaptchaenterprise.googleapis.com/Ass"
+ "essment\022+projects/{project}/assessments/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ message Assessment {
AccountDefenderAssessment account_defender_assessment = 6;

// Password leak verification info.
PrivatePasswordLeakVerification private_password_leak_verification = 7;
PrivatePasswordLeakVerification private_password_leak_verification = 8;
}

message Event {
Expand Down
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]
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]
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]
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]
Loading

0 comments on commit bb2c0ae

Please sign in to comment.