diff --git a/google-api-grpc/grpc-google-cloud-recaptchaenterprise-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-recaptchaenterprise-v1beta1/pom.xml
new file mode 100644
index 000000000000..11eab7d34faf
--- /dev/null
+++ b/google-api-grpc/grpc-google-cloud-recaptchaenterprise-v1beta1/pom.xml
@@ -0,0 +1,53 @@
+
+ * Service to determine the likelihood an event is legitimate. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto") +public final class RecaptchaEnterpriseServiceV1Beta1Grpc { + + private RecaptchaEnterpriseServiceV1Beta1Grpc() {} + + public static final String SERVICE_NAME = + "google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateAssessmentMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest, + com.google.recaptchaenterprise.v1beta1.Assessment> + METHOD_CREATE_ASSESSMENT = getCreateAssessmentMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest, + com.google.recaptchaenterprise.v1beta1.Assessment> + getCreateAssessmentMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest, + com.google.recaptchaenterprise.v1beta1.Assessment> + getCreateAssessmentMethod() { + return getCreateAssessmentMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest, + com.google.recaptchaenterprise.v1beta1.Assessment> + getCreateAssessmentMethodHelper() { + io.grpc.MethodDescriptor< + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest, + com.google.recaptchaenterprise.v1beta1.Assessment> + getCreateAssessmentMethod; + if ((getCreateAssessmentMethod = + RecaptchaEnterpriseServiceV1Beta1Grpc.getCreateAssessmentMethod) + == null) { + synchronized (RecaptchaEnterpriseServiceV1Beta1Grpc.class) { + if ((getCreateAssessmentMethod = + RecaptchaEnterpriseServiceV1Beta1Grpc.getCreateAssessmentMethod) + == null) { + RecaptchaEnterpriseServiceV1Beta1Grpc.getCreateAssessmentMethod = + getCreateAssessmentMethod = + io.grpc.MethodDescriptor + .
+ * Service to determine the likelihood an event is legitimate. + *+ */ + public abstract static class RecaptchaEnterpriseServiceV1Beta1ImplBase + implements io.grpc.BindableService { + + /** + * + * + *
+ * Creates an Assessment of the likelihood an event is legitimate. + *+ */ + public void createAssessment( + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest request, + io.grpc.stub.StreamObserver
+ * Annotates a previously created Assessment to provide additional information + * on whether the event turned out to be authentic or fradulent. + *+ */ + public void annotateAssessment( + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest request, + io.grpc.stub.StreamObserver< + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getAnnotateAssessmentMethodHelper(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateAssessmentMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest, + com.google.recaptchaenterprise.v1beta1.Assessment>( + this, METHODID_CREATE_ASSESSMENT))) + .addMethod( + getAnnotateAssessmentMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest, + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse>( + this, METHODID_ANNOTATE_ASSESSMENT))) + .build(); + } + } + + /** + * + * + *
+ * Service to determine the likelihood an event is legitimate. + *+ */ + public static final class RecaptchaEnterpriseServiceV1Beta1Stub + extends io.grpc.stub.AbstractStub
+ * Creates an Assessment of the likelihood an event is legitimate. + *+ */ + public void createAssessment( + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest request, + io.grpc.stub.StreamObserver
+ * Annotates a previously created Assessment to provide additional information + * on whether the event turned out to be authentic or fradulent. + *+ */ + public void annotateAssessment( + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest request, + io.grpc.stub.StreamObserver< + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getAnnotateAssessmentMethodHelper(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+ * Service to determine the likelihood an event is legitimate. + *+ */ + public static final class RecaptchaEnterpriseServiceV1Beta1BlockingStub + extends io.grpc.stub.AbstractStub
+ * Creates an Assessment of the likelihood an event is legitimate. + *+ */ + public com.google.recaptchaenterprise.v1beta1.Assessment createAssessment( + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest request) { + return blockingUnaryCall( + getChannel(), getCreateAssessmentMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Annotates a previously created Assessment to provide additional information + * on whether the event turned out to be authentic or fradulent. + *+ */ + public com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse annotateAssessment( + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest request) { + return blockingUnaryCall( + getChannel(), getAnnotateAssessmentMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+ * Service to determine the likelihood an event is legitimate. + *+ */ + public static final class RecaptchaEnterpriseServiceV1Beta1FutureStub + extends io.grpc.stub.AbstractStub
+ * Creates an Assessment of the likelihood an event is legitimate. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1beta1.Assessment> + createAssessment(com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateAssessmentMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Annotates a previously created Assessment to provide additional information + * on whether the event turned out to be authentic or fradulent. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse> + annotateAssessment( + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest request) { + return futureUnaryCall( + getChannel().newCall(getAnnotateAssessmentMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_ASSESSMENT = 0; + private static final int METHODID_ANNOTATE_ASSESSMENT = 1; + + private static final class MethodHandlers
+ * The request message to annotate an Assessment. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest} + */ +public final class AnnotateAssessmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest) + AnnotateAssessmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotateAssessmentRequest.newBuilder() to construct. + private AnnotateAssessmentRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AnnotateAssessmentRequest() { + name_ = ""; + annotation_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotateAssessmentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + annotation_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_AnnotateAssessmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_AnnotateAssessmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.class, + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Builder.class); + } + + /** + * + * + *
+ * Enum that reprensents the types of annotations. + *+ * + * Protobuf enum {@code + * google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation} + */ + public enum Annotation implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Default unspecified type. + *+ * + *
ANNOTATION_UNSPECIFIED = 0;
+ */
+ ANNOTATION_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Provides information that the event turned out to be legitimate. + *+ * + *
LEGITIMATE = 1;
+ */
+ LEGITIMATE(1),
+ /**
+ *
+ *
+ * + * Provides information that the event turned out to be fraudulent. + *+ * + *
FRAUDULENT = 2;
+ */
+ FRAUDULENT(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Default unspecified type. + *+ * + *
ANNOTATION_UNSPECIFIED = 0;
+ */
+ public static final int ANNOTATION_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Provides information that the event turned out to be legitimate. + *+ * + *
LEGITIMATE = 1;
+ */
+ public static final int LEGITIMATE_VALUE = 1;
+ /**
+ *
+ *
+ * + * Provides information that the event turned out to be fraudulent. + *+ * + *
FRAUDULENT = 2;
+ */
+ public static final int FRAUDULENT_VALUE = 2;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /** @deprecated Use {@link #forNumber(int)} instead. */
+ @java.lang.Deprecated
+ public static Annotation valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static Annotation forNumber(int value) {
+ switch (value) {
+ case 0:
+ return ANNOTATION_UNSPECIFIED;
+ case 1:
+ return LEGITIMATE;
+ case 2:
+ return FRAUDULENT;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Required. The resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ 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 resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ 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 ANNOTATION_FIELD_NUMBER = 2;
+ private int annotation_;
+ /**
+ *
+ *
+ * + * The annotation that will be assigned to the Event. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2;
+ *
+ */
+ public int getAnnotationValue() {
+ return annotation_;
+ }
+ /**
+ *
+ *
+ * + * The annotation that will be assigned to the Event. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation
+ getAnnotation() {
+ @SuppressWarnings("deprecation")
+ com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation result =
+ com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation.valueOf(
+ annotation_);
+ return result == null
+ ? com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation.UNRECOGNIZED
+ : result;
+ }
+
+ 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 (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (annotation_
+ != com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation
+ .ANNOTATION_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(2, annotation_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (annotation_
+ != com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation
+ .ANNOTATION_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, annotation_);
+ }
+ size += unknownFields.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.v1beta1.AnnotateAssessmentRequest)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest other =
+ (com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (annotation_ != other.annotation_) return false;
+ if (!unknownFields.equals(other.unknownFields)) 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) + ANNOTATION_FIELD_NUMBER;
+ hash = (53 * hash) + annotation_;
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest 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.v1beta1.AnnotateAssessmentRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest 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.v1beta1.AnnotateAssessmentRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest 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.v1beta1.AnnotateAssessmentRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest 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.v1beta1.AnnotateAssessmentRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest 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.v1beta1.AnnotateAssessmentRequest 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 request message to annotate an Assessment. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ 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 resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ 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 resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int annotation_ = 0;
+ /**
+ *
+ *
+ * + * The annotation that will be assigned to the Event. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2;
+ *
+ */
+ public int getAnnotationValue() {
+ return annotation_;
+ }
+ /**
+ *
+ *
+ * + * The annotation that will be assigned to the Event. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2;
+ *
+ */
+ public Builder setAnnotationValue(int value) {
+ annotation_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The annotation that will be assigned to the Event. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation
+ getAnnotation() {
+ @SuppressWarnings("deprecation")
+ com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation result =
+ com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation.valueOf(
+ annotation_);
+ return result == null
+ ? com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * The annotation that will be assigned to the Event. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2;
+ *
+ */
+ public Builder setAnnotation(
+ com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ annotation_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The annotation that will be assigned to the Event. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2;
+ *
+ */
+ public Builder clearAnnotation() {
+
+ annotation_ = 0;
+ 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.v1beta1.AnnotateAssessmentRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest)
+ private static final com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Required. The resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The annotation that will be assigned to the Event. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2;
+ *
+ */
+ int getAnnotationValue();
+ /**
+ *
+ *
+ * + * The annotation that will be assigned to the Event. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2;
+ *
+ */
+ com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation getAnnotation();
+}
diff --git a/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentResponse.java b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentResponse.java
new file mode 100644
index 000000000000..0dcf90dd90e6
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentResponse.java
@@ -0,0 +1,445 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * Empty response for AnnotateAssessment. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse} + */ +public final class AnnotateAssessmentResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse) + AnnotateAssessmentResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotateAssessmentResponse.newBuilder() to construct. + private AnnotateAssessmentResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AnnotateAssessmentResponse() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotateAssessmentResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_AnnotateAssessmentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_AnnotateAssessmentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse.class, + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse.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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.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.v1beta1.AnnotateAssessmentResponse)) { + return super.equals(obj); + } + com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse other = + (com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse 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.v1beta1.AnnotateAssessmentResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse 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.v1beta1.AnnotateAssessmentResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse 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.v1beta1.AnnotateAssessmentResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse + 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.v1beta1.AnnotateAssessmentResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse 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.v1beta1.AnnotateAssessmentResponse 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; + } + /** + * + * + *
+ * Empty response for AnnotateAssessment. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A recaptcha assessment resource. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.Assessment} + */ +public final class Assessment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.Assessment) + AssessmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Assessment.newBuilder() to construct. + private Assessment(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Assessment() { + name_ = ""; + reasons_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Assessment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.recaptchaenterprise.v1beta1.Event.Builder subBuilder = null; + if (event_ != null) { + subBuilder = event_.toBuilder(); + } + event_ = + input.readMessage( + com.google.recaptchaenterprise.v1beta1.Event.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(event_); + event_ = subBuilder.buildPartial(); + } + + break; + } + case 29: + { + score_ = input.readFloat(); + break; + } + case 34: + { + com.google.recaptchaenterprise.v1beta1.TokenProperties.Builder subBuilder = null; + if (tokenProperties_ != null) { + subBuilder = tokenProperties_.toBuilder(); + } + tokenProperties_ = + input.readMessage( + com.google.recaptchaenterprise.v1beta1.TokenProperties.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tokenProperties_); + tokenProperties_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + reasons_ = new java.util.ArrayList
+ * LINT.IfChange(classification_reason) + * Reasons contributing to the risk analysis verdict. + *+ * + * Protobuf enum {@code google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason} + */ + public enum ClassificationReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Default unspecified type. + *+ * + *
CLASSIFICATION_REASON_UNSPECIFIED = 0;
+ */
+ CLASSIFICATION_REASON_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * The event appeared to be automated. + *+ * + *
AUTOMATION = 1;
+ */
+ AUTOMATION(1),
+ /**
+ *
+ *
+ * + * The event was not made from the proper context on the real site. + *+ * + *
UNEXPECTED_ENVIRONMENT = 2;
+ */
+ UNEXPECTED_ENVIRONMENT(2),
+ /**
+ *
+ *
+ * + * Browsing behavior leading up to the event was generated was out of the + * ordinary. + *+ * + *
UNEXPECTED_USAGE_PATTERNS = 4;
+ */
+ UNEXPECTED_USAGE_PATTERNS(4),
+ /**
+ *
+ *
+ * + * Too little traffic has been received from this site thus far to generate + * quality risk analysis. + *+ * + *
PROVISIONAL_RISK_ANALYSIS = 5;
+ */
+ PROVISIONAL_RISK_ANALYSIS(5),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Default unspecified type. + *+ * + *
CLASSIFICATION_REASON_UNSPECIFIED = 0;
+ */
+ public static final int CLASSIFICATION_REASON_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * The event appeared to be automated. + *+ * + *
AUTOMATION = 1;
+ */
+ public static final int AUTOMATION_VALUE = 1;
+ /**
+ *
+ *
+ * + * The event was not made from the proper context on the real site. + *+ * + *
UNEXPECTED_ENVIRONMENT = 2;
+ */
+ public static final int UNEXPECTED_ENVIRONMENT_VALUE = 2;
+ /**
+ *
+ *
+ * + * Browsing behavior leading up to the event was generated was out of the + * ordinary. + *+ * + *
UNEXPECTED_USAGE_PATTERNS = 4;
+ */
+ public static final int UNEXPECTED_USAGE_PATTERNS_VALUE = 4;
+ /**
+ *
+ *
+ * + * Too little traffic has been received from this site thus far to generate + * quality risk analysis. + *+ * + *
PROVISIONAL_RISK_ANALYSIS = 5;
+ */
+ public static final int PROVISIONAL_RISK_ANALYSIS_VALUE = 5;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /** @deprecated Use {@link #forNumber(int)} instead. */
+ @java.lang.Deprecated
+ public static ClassificationReason valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static ClassificationReason forNumber(int value) {
+ switch (value) {
+ case 0:
+ return CLASSIFICATION_REASON_UNSPECIFIED;
+ case 1:
+ return AUTOMATION;
+ case 2:
+ return UNEXPECTED_ENVIRONMENT;
+ case 4:
+ return UNEXPECTED_USAGE_PATTERNS;
+ case 5:
+ return PROVISIONAL_RISK_ANALYSIS;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Output only. The resource name for the Assessment in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The resource name for the Assessment in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ 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 EVENT_FIELD_NUMBER = 2;
+ private com.google.recaptchaenterprise.v1beta1.Event event_;
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public boolean hasEvent() {
+ return event_ != null;
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Event getEvent() {
+ return event_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Event.getDefaultInstance()
+ : event_;
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.EventOrBuilder getEventOrBuilder() {
+ return getEvent();
+ }
+
+ public static final int SCORE_FIELD_NUMBER = 3;
+ private float score_;
+ /**
+ *
+ *
+ * + * Output only. Legitimate event score from 0.0 to 1.0. + * (1.0 means very likely legitimate traffic while 0.0 means very likely + * non-legitimate traffic). + *+ * + *
float score = 3;
+ */
+ public float getScore() {
+ return score_;
+ }
+
+ public static final int TOKEN_PROPERTIES_FIELD_NUMBER = 4;
+ private com.google.recaptchaenterprise.v1beta1.TokenProperties tokenProperties_;
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public boolean hasTokenProperties() {
+ return tokenProperties_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public com.google.recaptchaenterprise.v1beta1.TokenProperties getTokenProperties() {
+ return tokenProperties_ == null
+ ? com.google.recaptchaenterprise.v1beta1.TokenProperties.getDefaultInstance()
+ : tokenProperties_;
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public com.google.recaptchaenterprise.v1beta1.TokenPropertiesOrBuilder
+ getTokenPropertiesOrBuilder() {
+ return getTokenProperties();
+ }
+
+ public static final int REASONS_FIELD_NUMBER = 5;
+ private java.util.List+ * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public java.util.List+ * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public int getReasonsCount() {
+ return reasons_.size();
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.Assessment.ClassificationReason getReasons(
+ int index) {
+ return reasons_converter_.convert(reasons_.get(index));
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public java.util.List+ * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public int getReasonsValue(int index) {
+ return reasons_.get(index);
+ }
+
+ private int reasonsMemoizedSerializedSize;
+
+ 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 {
+ getSerializedSize();
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (event_ != null) {
+ output.writeMessage(2, getEvent());
+ }
+ if (score_ != 0F) {
+ output.writeFloat(3, score_);
+ }
+ if (tokenProperties_ != null) {
+ output.writeMessage(4, getTokenProperties());
+ }
+ if (getReasonsList().size() > 0) {
+ output.writeUInt32NoTag(42);
+ output.writeUInt32NoTag(reasonsMemoizedSerializedSize);
+ }
+ for (int i = 0; i < reasons_.size(); i++) {
+ output.writeEnumNoTag(reasons_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (event_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEvent());
+ }
+ if (score_ != 0F) {
+ size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, score_);
+ }
+ if (tokenProperties_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTokenProperties());
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < reasons_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(reasons_.get(i));
+ }
+ size += dataSize;
+ if (!getReasonsList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
+ }
+ reasonsMemoizedSerializedSize = dataSize;
+ }
+ size += unknownFields.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.v1beta1.Assessment)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.Assessment other =
+ (com.google.recaptchaenterprise.v1beta1.Assessment) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (hasEvent() != other.hasEvent()) return false;
+ if (hasEvent()) {
+ if (!getEvent().equals(other.getEvent())) return false;
+ }
+ if (java.lang.Float.floatToIntBits(getScore())
+ != java.lang.Float.floatToIntBits(other.getScore())) return false;
+ if (hasTokenProperties() != other.hasTokenProperties()) return false;
+ if (hasTokenProperties()) {
+ if (!getTokenProperties().equals(other.getTokenProperties())) return false;
+ }
+ if (!reasons_.equals(other.reasons_)) return false;
+ if (!unknownFields.equals(other.unknownFields)) 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();
+ if (hasEvent()) {
+ hash = (37 * hash) + EVENT_FIELD_NUMBER;
+ hash = (53 * hash) + getEvent().hashCode();
+ }
+ hash = (37 * hash) + SCORE_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore());
+ if (hasTokenProperties()) {
+ hash = (37 * hash) + TOKEN_PROPERTIES_FIELD_NUMBER;
+ hash = (53 * hash) + getTokenProperties().hashCode();
+ }
+ if (getReasonsCount() > 0) {
+ hash = (37 * hash) + REASONS_FIELD_NUMBER;
+ hash = (53 * hash) + reasons_.hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Assessment parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Assessment 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.v1beta1.Assessment parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Assessment 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.v1beta1.Assessment parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Assessment parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Assessment parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Assessment 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.v1beta1.Assessment parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Assessment 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.v1beta1.Assessment parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Assessment 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.v1beta1.Assessment 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 recaptcha assessment resource. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.Assessment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Output only. The resource name for the Assessment in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The resource name for the Assessment in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ 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;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The resource name for the Assessment in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The resource name for the Assessment in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The resource name for the Assessment in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.recaptchaenterprise.v1beta1.Event event_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Event,
+ com.google.recaptchaenterprise.v1beta1.Event.Builder,
+ com.google.recaptchaenterprise.v1beta1.EventOrBuilder>
+ eventBuilder_;
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public boolean hasEvent() {
+ return eventBuilder_ != null || event_ != null;
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Event getEvent() {
+ if (eventBuilder_ == null) {
+ return event_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Event.getDefaultInstance()
+ : event_;
+ } else {
+ return eventBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public Builder setEvent(com.google.recaptchaenterprise.v1beta1.Event value) {
+ if (eventBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ event_ = value;
+ onChanged();
+ } else {
+ eventBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public Builder setEvent(com.google.recaptchaenterprise.v1beta1.Event.Builder builderForValue) {
+ if (eventBuilder_ == null) {
+ event_ = builderForValue.build();
+ onChanged();
+ } else {
+ eventBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public Builder mergeEvent(com.google.recaptchaenterprise.v1beta1.Event value) {
+ if (eventBuilder_ == null) {
+ if (event_ != null) {
+ event_ =
+ com.google.recaptchaenterprise.v1beta1.Event.newBuilder(event_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ event_ = value;
+ }
+ onChanged();
+ } else {
+ eventBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public Builder clearEvent() {
+ if (eventBuilder_ == null) {
+ event_ = null;
+ onChanged();
+ } else {
+ event_ = null;
+ eventBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Event.Builder getEventBuilder() {
+
+ onChanged();
+ return getEventFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.EventOrBuilder getEventOrBuilder() {
+ if (eventBuilder_ != null) {
+ return eventBuilder_.getMessageOrBuilder();
+ } else {
+ return event_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Event.getDefaultInstance()
+ : event_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Event,
+ com.google.recaptchaenterprise.v1beta1.Event.Builder,
+ com.google.recaptchaenterprise.v1beta1.EventOrBuilder>
+ getEventFieldBuilder() {
+ if (eventBuilder_ == null) {
+ eventBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Event,
+ com.google.recaptchaenterprise.v1beta1.Event.Builder,
+ com.google.recaptchaenterprise.v1beta1.EventOrBuilder>(
+ getEvent(), getParentForChildren(), isClean());
+ event_ = null;
+ }
+ return eventBuilder_;
+ }
+
+ private float score_;
+ /**
+ *
+ *
+ * + * Output only. Legitimate event score from 0.0 to 1.0. + * (1.0 means very likely legitimate traffic while 0.0 means very likely + * non-legitimate traffic). + *+ * + *
float score = 3;
+ */
+ public float getScore() {
+ return score_;
+ }
+ /**
+ *
+ *
+ * + * Output only. Legitimate event score from 0.0 to 1.0. + * (1.0 means very likely legitimate traffic while 0.0 means very likely + * non-legitimate traffic). + *+ * + *
float score = 3;
+ */
+ public Builder setScore(float value) {
+
+ score_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Legitimate event score from 0.0 to 1.0. + * (1.0 means very likely legitimate traffic while 0.0 means very likely + * non-legitimate traffic). + *+ * + *
float score = 3;
+ */
+ public Builder clearScore() {
+
+ score_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ private com.google.recaptchaenterprise.v1beta1.TokenProperties tokenProperties_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.TokenProperties,
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.Builder,
+ com.google.recaptchaenterprise.v1beta1.TokenPropertiesOrBuilder>
+ tokenPropertiesBuilder_;
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public boolean hasTokenProperties() {
+ return tokenPropertiesBuilder_ != null || tokenProperties_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public com.google.recaptchaenterprise.v1beta1.TokenProperties getTokenProperties() {
+ if (tokenPropertiesBuilder_ == null) {
+ return tokenProperties_ == null
+ ? com.google.recaptchaenterprise.v1beta1.TokenProperties.getDefaultInstance()
+ : tokenProperties_;
+ } else {
+ return tokenPropertiesBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public Builder setTokenProperties(
+ com.google.recaptchaenterprise.v1beta1.TokenProperties value) {
+ if (tokenPropertiesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ tokenProperties_ = value;
+ onChanged();
+ } else {
+ tokenPropertiesBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public Builder setTokenProperties(
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.Builder builderForValue) {
+ if (tokenPropertiesBuilder_ == null) {
+ tokenProperties_ = builderForValue.build();
+ onChanged();
+ } else {
+ tokenPropertiesBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public Builder mergeTokenProperties(
+ com.google.recaptchaenterprise.v1beta1.TokenProperties value) {
+ if (tokenPropertiesBuilder_ == null) {
+ if (tokenProperties_ != null) {
+ tokenProperties_ =
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.newBuilder(tokenProperties_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ tokenProperties_ = value;
+ }
+ onChanged();
+ } else {
+ tokenPropertiesBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public Builder clearTokenProperties() {
+ if (tokenPropertiesBuilder_ == null) {
+ tokenProperties_ = null;
+ onChanged();
+ } else {
+ tokenProperties_ = null;
+ tokenPropertiesBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public com.google.recaptchaenterprise.v1beta1.TokenProperties.Builder
+ getTokenPropertiesBuilder() {
+
+ onChanged();
+ return getTokenPropertiesFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ public com.google.recaptchaenterprise.v1beta1.TokenPropertiesOrBuilder
+ getTokenPropertiesOrBuilder() {
+ if (tokenPropertiesBuilder_ != null) {
+ return tokenPropertiesBuilder_.getMessageOrBuilder();
+ } else {
+ return tokenProperties_ == null
+ ? com.google.recaptchaenterprise.v1beta1.TokenProperties.getDefaultInstance()
+ : tokenProperties_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.TokenProperties,
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.Builder,
+ com.google.recaptchaenterprise.v1beta1.TokenPropertiesOrBuilder>
+ getTokenPropertiesFieldBuilder() {
+ if (tokenPropertiesBuilder_ == null) {
+ tokenPropertiesBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.TokenProperties,
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.Builder,
+ com.google.recaptchaenterprise.v1beta1.TokenPropertiesOrBuilder>(
+ getTokenProperties(), getParentForChildren(), isClean());
+ tokenProperties_ = null;
+ }
+ return tokenPropertiesBuilder_;
+ }
+
+ private java.util.List+ * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public java.util.List+ * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public int getReasonsCount() {
+ return reasons_.size();
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.Assessment.ClassificationReason getReasons(
+ int index) {
+ return reasons_converter_.convert(reasons_.get(index));
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public Builder setReasons(
+ int index, com.google.recaptchaenterprise.v1beta1.Assessment.ClassificationReason value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureReasonsIsMutable();
+ reasons_.set(index, value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public Builder addReasons(
+ com.google.recaptchaenterprise.v1beta1.Assessment.ClassificationReason value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureReasonsIsMutable();
+ reasons_.add(value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public Builder addAllReasons(
+ java.lang.Iterable<
+ ? extends com.google.recaptchaenterprise.v1beta1.Assessment.ClassificationReason>
+ values) {
+ ensureReasonsIsMutable();
+ for (com.google.recaptchaenterprise.v1beta1.Assessment.ClassificationReason value : values) {
+ reasons_.add(value.getNumber());
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public Builder clearReasons() {
+ reasons_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public java.util.List+ * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public int getReasonsValue(int index) {
+ return reasons_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public Builder setReasonsValue(int index, int value) {
+ ensureReasonsIsMutable();
+ reasons_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public Builder addReasonsValue(int value) {
+ ensureReasonsIsMutable();
+ reasons_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ public Builder addAllReasonsValue(java.lang.Iterable
+ * Output only. The resource name for the Assessment in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * Output only. The resource name for the Assessment in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ *
+ *
+ * string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ boolean hasEvent();
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ com.google.recaptchaenterprise.v1beta1.Event getEvent();
+ /**
+ *
+ *
+ * + * The event being assessed. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Event event = 2;
+ */
+ com.google.recaptchaenterprise.v1beta1.EventOrBuilder getEventOrBuilder();
+
+ /**
+ *
+ *
+ * + * Output only. Legitimate event score from 0.0 to 1.0. + * (1.0 means very likely legitimate traffic while 0.0 means very likely + * non-legitimate traffic). + *+ * + *
float score = 3;
+ */
+ float getScore();
+
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ boolean hasTokenProperties();
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ com.google.recaptchaenterprise.v1beta1.TokenProperties getTokenProperties();
+ /**
+ *
+ *
+ * + * Output only. Properties of the provided event token. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.TokenProperties token_properties = 4;
+ */
+ com.google.recaptchaenterprise.v1beta1.TokenPropertiesOrBuilder getTokenPropertiesOrBuilder();
+
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ java.util.List+ * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ int getReasonsCount();
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ com.google.recaptchaenterprise.v1beta1.Assessment.ClassificationReason getReasons(int index);
+ /**
+ *
+ *
+ * + * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ java.util.List+ * Output only. Reasons contributing to the risk analysis verdict. + *+ * + *
+ * repeated .google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason reasons = 5;
+ *
+ */
+ int getReasonsValue(int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequest.java b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequest.java
new file mode 100644
index 000000000000..c89e530f494e
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateAssessmentRequest.java
@@ -0,0 +1,880 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * The create assessment request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest} + */ +public final class CreateAssessmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest) + CreateAssessmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAssessmentRequest.newBuilder() to construct. + private CreateAssessmentRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CreateAssessmentRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateAssessmentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.recaptchaenterprise.v1beta1.Assessment.Builder subBuilder = null; + if (assessment_ != null) { + subBuilder = assessment_.toBuilder(); + } + assessment_ = + input.readMessage( + com.google.recaptchaenterprise.v1beta1.Assessment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(assessment_); + assessment_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_CreateAssessmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_CreateAssessmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest.class, + com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Required. The name of the project in which the assessment will be created,
+ * in the format "projects/{project_number}".
+ *
+ *
+ * string parent = 1;
+ */
+ 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 in which the assessment will be created,
+ * in the format "projects/{project_number}".
+ *
+ *
+ * string parent = 1;
+ */
+ 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 ASSESSMENT_FIELD_NUMBER = 2;
+ private com.google.recaptchaenterprise.v1beta1.Assessment assessment_;
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public boolean hasAssessment() {
+ return assessment_ != null;
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Assessment getAssessment() {
+ return assessment_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Assessment.getDefaultInstance()
+ : assessment_;
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.AssessmentOrBuilder getAssessmentOrBuilder() {
+ return getAssessment();
+ }
+
+ 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 (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (assessment_ != null) {
+ output.writeMessage(2, getAssessment());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (assessment_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAssessment());
+ }
+ size += unknownFields.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.v1beta1.CreateAssessmentRequest)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest other =
+ (com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (hasAssessment() != other.hasAssessment()) return false;
+ if (hasAssessment()) {
+ if (!getAssessment().equals(other.getAssessment())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) 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 (hasAssessment()) {
+ hash = (37 * hash) + ASSESSMENT_FIELD_NUMBER;
+ hash = (53 * hash) + getAssessment().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest 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.v1beta1.CreateAssessmentRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest 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.v1beta1.CreateAssessmentRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest 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.v1beta1.CreateAssessmentRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest 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.v1beta1.CreateAssessmentRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest 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.v1beta1.CreateAssessmentRequest 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 assessment request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the project in which the assessment will be created,
+ * in the format "projects/{project_number}".
+ *
+ *
+ * string parent = 1;
+ */
+ 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 in which the assessment will be created,
+ * in the format "projects/{project_number}".
+ *
+ *
+ * string parent = 1;
+ */
+ 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 in which the assessment will be created,
+ * in the format "projects/{project_number}".
+ *
+ *
+ * string parent = 1;
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the project in which the assessment will be created,
+ * in the format "projects/{project_number}".
+ *
+ *
+ * string parent = 1;
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the project in which the assessment will be created,
+ * in the format "projects/{project_number}".
+ *
+ *
+ * string parent = 1;
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.recaptchaenterprise.v1beta1.Assessment assessment_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Assessment,
+ com.google.recaptchaenterprise.v1beta1.Assessment.Builder,
+ com.google.recaptchaenterprise.v1beta1.AssessmentOrBuilder>
+ assessmentBuilder_;
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public boolean hasAssessment() {
+ return assessmentBuilder_ != null || assessment_ != null;
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Assessment getAssessment() {
+ if (assessmentBuilder_ == null) {
+ return assessment_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Assessment.getDefaultInstance()
+ : assessment_;
+ } else {
+ return assessmentBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public Builder setAssessment(com.google.recaptchaenterprise.v1beta1.Assessment value) {
+ if (assessmentBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ assessment_ = value;
+ onChanged();
+ } else {
+ assessmentBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public Builder setAssessment(
+ com.google.recaptchaenterprise.v1beta1.Assessment.Builder builderForValue) {
+ if (assessmentBuilder_ == null) {
+ assessment_ = builderForValue.build();
+ onChanged();
+ } else {
+ assessmentBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public Builder mergeAssessment(com.google.recaptchaenterprise.v1beta1.Assessment value) {
+ if (assessmentBuilder_ == null) {
+ if (assessment_ != null) {
+ assessment_ =
+ com.google.recaptchaenterprise.v1beta1.Assessment.newBuilder(assessment_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ assessment_ = value;
+ }
+ onChanged();
+ } else {
+ assessmentBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public Builder clearAssessment() {
+ if (assessmentBuilder_ == null) {
+ assessment_ = null;
+ onChanged();
+ } else {
+ assessment_ = null;
+ assessmentBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Assessment.Builder getAssessmentBuilder() {
+
+ onChanged();
+ return getAssessmentFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ public com.google.recaptchaenterprise.v1beta1.AssessmentOrBuilder getAssessmentOrBuilder() {
+ if (assessmentBuilder_ != null) {
+ return assessmentBuilder_.getMessageOrBuilder();
+ } else {
+ return assessment_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Assessment.getDefaultInstance()
+ : assessment_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Assessment,
+ com.google.recaptchaenterprise.v1beta1.Assessment.Builder,
+ com.google.recaptchaenterprise.v1beta1.AssessmentOrBuilder>
+ getAssessmentFieldBuilder() {
+ if (assessmentBuilder_ == null) {
+ assessmentBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Assessment,
+ com.google.recaptchaenterprise.v1beta1.Assessment.Builder,
+ com.google.recaptchaenterprise.v1beta1.AssessmentOrBuilder>(
+ getAssessment(), getParentForChildren(), isClean());
+ assessment_ = null;
+ }
+ return assessmentBuilder_;
+ }
+
+ @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.v1beta1.CreateAssessmentRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest)
+ private static final com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Required. The name of the project in which the assessment will be created,
+ * in the format "projects/{project_number}".
+ *
+ *
+ * string parent = 1;
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ *
+ * Required. The name of the project in which the assessment will be created,
+ * in the format "projects/{project_number}".
+ *
+ *
+ * string parent = 1;
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ boolean hasAssessment();
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ com.google.recaptchaenterprise.v1beta1.Assessment getAssessment();
+ /**
+ *
+ *
+ * + * The asessment details. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.Assessment assessment = 2;
+ */
+ com.google.recaptchaenterprise.v1beta1.AssessmentOrBuilder getAssessmentOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Event.java b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Event.java
new file mode 100644
index 000000000000..e8d2750c2a19
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Event.java
@@ -0,0 +1,755 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/** Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.Event} */
+public final class Event extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.Event)
+ EventOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Event.newBuilder() to construct.
+ private Event(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private Event() {
+ token_ = "";
+ siteKey_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private Event(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ token_ = s;
+ break;
+ }
+ case 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ siteKey_ = s;
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto
+ .internal_static_google_cloud_recaptchaenterprise_v1beta1_Event_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto
+ .internal_static_google_cloud_recaptchaenterprise_v1beta1_Event_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.recaptchaenterprise.v1beta1.Event.class,
+ com.google.recaptchaenterprise.v1beta1.Event.Builder.class);
+ }
+
+ public static final int TOKEN_FIELD_NUMBER = 1;
+ private volatile java.lang.Object token_;
+ /**
+ *
+ *
+ * + * The user response token provided by the reCAPTCHA client-side integration + * on your site. + *+ * + *
string token = 1;
+ */
+ public java.lang.String getToken() {
+ java.lang.Object ref = token_;
+ 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();
+ token_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The user response token provided by the reCAPTCHA client-side integration + * on your site. + *+ * + *
string token = 1;
+ */
+ public com.google.protobuf.ByteString getTokenBytes() {
+ java.lang.Object ref = token_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ token_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SITE_KEY_FIELD_NUMBER = 2;
+ private volatile java.lang.Object siteKey_;
+ /**
+ *
+ *
+ * + * The site key that was used to invoke reCAPTCHA on your site and generate + * the token. + *+ * + *
string site_key = 2;
+ */
+ public java.lang.String getSiteKey() {
+ java.lang.Object ref = siteKey_;
+ 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();
+ siteKey_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The site key that was used to invoke reCAPTCHA on your site and generate + * the token. + *+ * + *
string site_key = 2;
+ */
+ public com.google.protobuf.ByteString getSiteKeyBytes() {
+ java.lang.Object ref = siteKey_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ siteKey_ = 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 (!getTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_);
+ }
+ if (!getSiteKeyBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteKey_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_);
+ }
+ if (!getSiteKeyBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteKey_);
+ }
+ size += unknownFields.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.v1beta1.Event)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.Event other =
+ (com.google.recaptchaenterprise.v1beta1.Event) obj;
+
+ if (!getToken().equals(other.getToken())) return false;
+ if (!getSiteKey().equals(other.getSiteKey())) return false;
+ if (!unknownFields.equals(other.unknownFields)) 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) + TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getToken().hashCode();
+ hash = (37 * hash) + SITE_KEY_FIELD_NUMBER;
+ hash = (53 * hash) + getSiteKey().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Event 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.v1beta1.Event parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Event 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.v1beta1.Event parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Event 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.v1beta1.Event parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Event 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.v1beta1.Event parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Event 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.v1beta1.Event 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;
+ }
+ /** Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.Event} */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder+ * The user response token provided by the reCAPTCHA client-side integration + * on your site. + *+ * + *
string token = 1;
+ */
+ public java.lang.String getToken() {
+ java.lang.Object ref = token_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ token_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The user response token provided by the reCAPTCHA client-side integration + * on your site. + *+ * + *
string token = 1;
+ */
+ public com.google.protobuf.ByteString getTokenBytes() {
+ java.lang.Object ref = token_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ token_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The user response token provided by the reCAPTCHA client-side integration + * on your site. + *+ * + *
string token = 1;
+ */
+ public Builder setToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ token_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The user response token provided by the reCAPTCHA client-side integration + * on your site. + *+ * + *
string token = 1;
+ */
+ public Builder clearToken() {
+
+ token_ = getDefaultInstance().getToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The user response token provided by the reCAPTCHA client-side integration + * on your site. + *+ * + *
string token = 1;
+ */
+ public Builder setTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ token_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object siteKey_ = "";
+ /**
+ *
+ *
+ * + * The site key that was used to invoke reCAPTCHA on your site and generate + * the token. + *+ * + *
string site_key = 2;
+ */
+ public java.lang.String getSiteKey() {
+ java.lang.Object ref = siteKey_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ siteKey_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The site key that was used to invoke reCAPTCHA on your site and generate + * the token. + *+ * + *
string site_key = 2;
+ */
+ public com.google.protobuf.ByteString getSiteKeyBytes() {
+ java.lang.Object ref = siteKey_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ siteKey_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The site key that was used to invoke reCAPTCHA on your site and generate + * the token. + *+ * + *
string site_key = 2;
+ */
+ public Builder setSiteKey(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ siteKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The site key that was used to invoke reCAPTCHA on your site and generate + * the token. + *+ * + *
string site_key = 2;
+ */
+ public Builder clearSiteKey() {
+
+ siteKey_ = getDefaultInstance().getSiteKey();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The site key that was used to invoke reCAPTCHA on your site and generate + * the token. + *+ * + *
string site_key = 2;
+ */
+ public Builder setSiteKeyBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ siteKey_ = value;
+ 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.v1beta1.Event)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.Event)
+ private static final com.google.recaptchaenterprise.v1beta1.Event DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.Event();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Event getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The user response token provided by the reCAPTCHA client-side integration + * on your site. + *+ * + *
string token = 1;
+ */
+ java.lang.String getToken();
+ /**
+ *
+ *
+ * + * The user response token provided by the reCAPTCHA client-side integration + * on your site. + *+ * + *
string token = 1;
+ */
+ com.google.protobuf.ByteString getTokenBytes();
+
+ /**
+ *
+ *
+ * + * The site key that was used to invoke reCAPTCHA on your site and generate + * the token. + *+ * + *
string site_key = 2;
+ */
+ java.lang.String getSiteKey();
+ /**
+ *
+ *
+ * + * The site key that was used to invoke reCAPTCHA on your site and generate + * the token. + *+ * + *
string site_key = 2;
+ */
+ com.google.protobuf.ByteString getSiteKeyBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/ProjectName.java b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/ProjectName.java
new file mode 100644
index 000000000000..9a6bb483ef88
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/ProjectName.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2018 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
+ *
+ * http://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.recaptchaenterprise.v1beta1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class ProjectName implements ResourceName {
+
+ private static final PathTemplate PATH_TEMPLATE =
+ PathTemplate.createWithoutUrlEncoding("projects/{project}");
+
+ private volatile Map+ * Enum that represents the types of invalid token reasons. + *+ * + * Protobuf enum {@code google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason} + */ + public enum InvalidReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Default unspecified type. + *+ * + *
INVALID_REASON_UNSPECIFIED = 0;
+ */
+ INVALID_REASON_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * If the failure reason was not accounted for. + *+ * + *
UNKNOWN_INVALID_REASON = 1;
+ */
+ UNKNOWN_INVALID_REASON(1),
+ /**
+ *
+ *
+ * + * The provided user verification token was malformed. + *+ * + *
MALFORMED = 2;
+ */
+ MALFORMED(2),
+ /**
+ *
+ *
+ * + * The user verification token had expired. + *+ * + *
EXPIRED = 3;
+ */
+ EXPIRED(3),
+ /**
+ *
+ *
+ * + * The user verification had already been seen. + *+ * + *
DUPE = 4;
+ */
+ DUPE(4),
+ /**
+ *
+ *
+ * + * The user verification token did not match the provided site secret. + * This may be a configuration error (e.g. development keys used in + * production) or end users trying to use verification tokens from other + * sites. + *+ * + *
SITE_MISMATCH = 5;
+ */
+ SITE_MISMATCH(5),
+ /**
+ *
+ *
+ * + * The user verification token was not present. It is a required input. + *+ * + *
MISSING = 6;
+ */
+ MISSING(6),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Default unspecified type. + *+ * + *
INVALID_REASON_UNSPECIFIED = 0;
+ */
+ public static final int INVALID_REASON_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * If the failure reason was not accounted for. + *+ * + *
UNKNOWN_INVALID_REASON = 1;
+ */
+ public static final int UNKNOWN_INVALID_REASON_VALUE = 1;
+ /**
+ *
+ *
+ * + * The provided user verification token was malformed. + *+ * + *
MALFORMED = 2;
+ */
+ public static final int MALFORMED_VALUE = 2;
+ /**
+ *
+ *
+ * + * The user verification token had expired. + *+ * + *
EXPIRED = 3;
+ */
+ public static final int EXPIRED_VALUE = 3;
+ /**
+ *
+ *
+ * + * The user verification had already been seen. + *+ * + *
DUPE = 4;
+ */
+ public static final int DUPE_VALUE = 4;
+ /**
+ *
+ *
+ * + * The user verification token did not match the provided site secret. + * This may be a configuration error (e.g. development keys used in + * production) or end users trying to use verification tokens from other + * sites. + *+ * + *
SITE_MISMATCH = 5;
+ */
+ public static final int SITE_MISMATCH_VALUE = 5;
+ /**
+ *
+ *
+ * + * The user verification token was not present. It is a required input. + *+ * + *
MISSING = 6;
+ */
+ public static final int MISSING_VALUE = 6;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /** @deprecated Use {@link #forNumber(int)} instead. */
+ @java.lang.Deprecated
+ public static InvalidReason valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static InvalidReason forNumber(int value) {
+ switch (value) {
+ case 0:
+ return INVALID_REASON_UNSPECIFIED;
+ case 1:
+ return UNKNOWN_INVALID_REASON;
+ case 2:
+ return MALFORMED;
+ case 3:
+ return EXPIRED;
+ case 4:
+ return DUPE;
+ case 5:
+ return SITE_MISMATCH;
+ case 6:
+ return MISSING;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Output only. Whether the provided user response token is valid. + *+ * + *
bool valid = 1;
+ */
+ public boolean getValid() {
+ return valid_;
+ }
+
+ public static final int INVALID_REASON_FIELD_NUMBER = 2;
+ private int invalidReason_;
+ /**
+ *
+ *
+ * + * Output only. Reason associated with the response when valid = false. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason invalid_reason = 2;
+ *
+ */
+ public int getInvalidReasonValue() {
+ return invalidReason_;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reason associated with the response when valid = false. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason invalid_reason = 2;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason getInvalidReason() {
+ @SuppressWarnings("deprecation")
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason result =
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason.valueOf(
+ invalidReason_);
+ return result == null
+ ? com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int CREATE_TIME_FIELD_NUMBER = 3;
+ private com.google.protobuf.Timestamp createTime_;
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public boolean hasCreateTime() {
+ return createTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public com.google.protobuf.Timestamp getCreateTime() {
+ return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ return getCreateTime();
+ }
+
+ public static final int HOSTNAME_FIELD_NUMBER = 4;
+ private volatile java.lang.Object hostname_;
+ /**
+ *
+ *
+ * + * Output only. The hostname of the page on which the token was generated. + *+ * + *
string hostname = 4;
+ */
+ public java.lang.String getHostname() {
+ java.lang.Object ref = hostname_;
+ 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();
+ hostname_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. The hostname of the page on which the token was generated. + *+ * + *
string hostname = 4;
+ */
+ public com.google.protobuf.ByteString getHostnameBytes() {
+ java.lang.Object ref = hostname_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ hostname_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ACTION_FIELD_NUMBER = 5;
+ private volatile java.lang.Object action_;
+ /**
+ *
+ *
+ * + * Output only. Action name provided at token generation. + *+ * + *
string action = 5;
+ */
+ public java.lang.String getAction() {
+ java.lang.Object ref = action_;
+ 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();
+ action_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Action name provided at token generation. + *+ * + *
string action = 5;
+ */
+ public com.google.protobuf.ByteString getActionBytes() {
+ java.lang.Object ref = action_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ action_ = 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 (valid_ != false) {
+ output.writeBool(1, valid_);
+ }
+ if (invalidReason_
+ != com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason
+ .INVALID_REASON_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(2, invalidReason_);
+ }
+ if (createTime_ != null) {
+ output.writeMessage(3, getCreateTime());
+ }
+ if (!getHostnameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, hostname_);
+ }
+ if (!getActionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, action_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (valid_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, valid_);
+ }
+ if (invalidReason_
+ != com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason
+ .INVALID_REASON_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, invalidReason_);
+ }
+ if (createTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime());
+ }
+ if (!getHostnameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, hostname_);
+ }
+ if (!getActionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, action_);
+ }
+ size += unknownFields.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.v1beta1.TokenProperties)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.TokenProperties other =
+ (com.google.recaptchaenterprise.v1beta1.TokenProperties) obj;
+
+ if (getValid() != other.getValid()) return false;
+ if (invalidReason_ != other.invalidReason_) return false;
+ if (hasCreateTime() != other.hasCreateTime()) return false;
+ if (hasCreateTime()) {
+ if (!getCreateTime().equals(other.getCreateTime())) return false;
+ }
+ if (!getHostname().equals(other.getHostname())) return false;
+ if (!getAction().equals(other.getAction())) return false;
+ if (!unknownFields.equals(other.unknownFields)) 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) + VALID_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValid());
+ hash = (37 * hash) + INVALID_REASON_FIELD_NUMBER;
+ hash = (53 * hash) + invalidReason_;
+ if (hasCreateTime()) {
+ hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getCreateTime().hashCode();
+ }
+ hash = (37 * hash) + HOSTNAME_FIELD_NUMBER;
+ hash = (53 * hash) + getHostname().hashCode();
+ hash = (37 * hash) + ACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getAction().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.TokenProperties parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.TokenProperties 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.v1beta1.TokenProperties parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.TokenProperties 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.v1beta1.TokenProperties parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.TokenProperties parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.TokenProperties parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.TokenProperties 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.v1beta1.TokenProperties parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.TokenProperties 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.v1beta1.TokenProperties parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.TokenProperties 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.v1beta1.TokenProperties 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;
+ }
+ /** Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.TokenProperties} */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder+ * Output only. Whether the provided user response token is valid. + *+ * + *
bool valid = 1;
+ */
+ public boolean getValid() {
+ return valid_;
+ }
+ /**
+ *
+ *
+ * + * Output only. Whether the provided user response token is valid. + *+ * + *
bool valid = 1;
+ */
+ public Builder setValid(boolean value) {
+
+ valid_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Whether the provided user response token is valid. + *+ * + *
bool valid = 1;
+ */
+ public Builder clearValid() {
+
+ valid_ = false;
+ onChanged();
+ return this;
+ }
+
+ private int invalidReason_ = 0;
+ /**
+ *
+ *
+ * + * Output only. Reason associated with the response when valid = false. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason invalid_reason = 2;
+ *
+ */
+ public int getInvalidReasonValue() {
+ return invalidReason_;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reason associated with the response when valid = false. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason invalid_reason = 2;
+ *
+ */
+ public Builder setInvalidReasonValue(int value) {
+ invalidReason_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reason associated with the response when valid = false. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason invalid_reason = 2;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason getInvalidReason() {
+ @SuppressWarnings("deprecation")
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason result =
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason.valueOf(
+ invalidReason_);
+ return result == null
+ ? com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reason associated with the response when valid = false. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason invalid_reason = 2;
+ *
+ */
+ public Builder setInvalidReason(
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ invalidReason_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Reason associated with the response when valid = false. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason invalid_reason = 2;
+ *
+ */
+ public Builder clearInvalidReason() {
+
+ invalidReason_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp createTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ createTimeBuilder_;
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public boolean hasCreateTime() {
+ return createTimeBuilder_ != null || createTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public com.google.protobuf.Timestamp getCreateTime() {
+ if (createTimeBuilder_ == null) {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ } else {
+ return createTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ createTime_ = value;
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (createTimeBuilder_ == null) {
+ createTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ createTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
+ if (createTimeBuilder_ == null) {
+ if (createTime_ != null) {
+ createTime_ =
+ com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
+ } else {
+ createTime_ = value;
+ }
+ onChanged();
+ } else {
+ createTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public Builder clearCreateTime() {
+ if (createTimeBuilder_ == null) {
+ createTime_ = null;
+ onChanged();
+ } else {
+ createTime_ = null;
+ createTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
+
+ onChanged();
+ return getCreateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
+ if (createTimeBuilder_ != null) {
+ return createTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return createTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : createTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getCreateTimeFieldBuilder() {
+ if (createTimeBuilder_ == null) {
+ createTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getCreateTime(), getParentForChildren(), isClean());
+ createTime_ = null;
+ }
+ return createTimeBuilder_;
+ }
+
+ private java.lang.Object hostname_ = "";
+ /**
+ *
+ *
+ * + * Output only. The hostname of the page on which the token was generated. + *+ * + *
string hostname = 4;
+ */
+ public java.lang.String getHostname() {
+ java.lang.Object ref = hostname_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ hostname_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. The hostname of the page on which the token was generated. + *+ * + *
string hostname = 4;
+ */
+ public com.google.protobuf.ByteString getHostnameBytes() {
+ java.lang.Object ref = hostname_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ hostname_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. The hostname of the page on which the token was generated. + *+ * + *
string hostname = 4;
+ */
+ public Builder setHostname(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ hostname_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. The hostname of the page on which the token was generated. + *+ * + *
string hostname = 4;
+ */
+ public Builder clearHostname() {
+
+ hostname_ = getDefaultInstance().getHostname();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. The hostname of the page on which the token was generated. + *+ * + *
string hostname = 4;
+ */
+ public Builder setHostnameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ hostname_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object action_ = "";
+ /**
+ *
+ *
+ * + * Output only. Action name provided at token generation. + *+ * + *
string action = 5;
+ */
+ public java.lang.String getAction() {
+ java.lang.Object ref = action_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ action_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Action name provided at token generation. + *+ * + *
string action = 5;
+ */
+ public com.google.protobuf.ByteString getActionBytes() {
+ java.lang.Object ref = action_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ action_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Output only. Action name provided at token generation. + *+ * + *
string action = 5;
+ */
+ public Builder setAction(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ action_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Action name provided at token generation. + *+ * + *
string action = 5;
+ */
+ public Builder clearAction() {
+
+ action_ = getDefaultInstance().getAction();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Output only. Action name provided at token generation. + *+ * + *
string action = 5;
+ */
+ public Builder setActionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ action_ = value;
+ 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.v1beta1.TokenProperties)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.TokenProperties)
+ private static final com.google.recaptchaenterprise.v1beta1.TokenProperties DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.TokenProperties();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.TokenProperties getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Output only. Whether the provided user response token is valid. + *+ * + *
bool valid = 1;
+ */
+ boolean getValid();
+
+ /**
+ *
+ *
+ * + * Output only. Reason associated with the response when valid = false. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason invalid_reason = 2;
+ *
+ */
+ int getInvalidReasonValue();
+ /**
+ *
+ *
+ * + * Output only. Reason associated with the response when valid = false. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason invalid_reason = 2;
+ *
+ */
+ com.google.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason getInvalidReason();
+
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ boolean hasCreateTime();
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ com.google.protobuf.Timestamp getCreateTime();
+ /**
+ *
+ *
+ * + * Output only. The timestamp corresponding to the generation of the token. + *+ * + *
.google.protobuf.Timestamp create_time = 3;
+ */
+ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Output only. The hostname of the page on which the token was generated. + *+ * + *
string hostname = 4;
+ */
+ java.lang.String getHostname();
+ /**
+ *
+ *
+ * + * Output only. The hostname of the page on which the token was generated. + *+ * + *
string hostname = 4;
+ */
+ com.google.protobuf.ByteString getHostnameBytes();
+
+ /**
+ *
+ *
+ * + * Output only. Action name provided at token generation. + *+ * + *
string action = 5;
+ */
+ java.lang.String getAction();
+ /**
+ *
+ *
+ * + * Output only. Action name provided at token generation. + *+ * + *
string action = 5;
+ */
+ com.google.protobuf.ByteString getActionBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
new file mode 100644
index 000000000000..188f99f6f777
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
@@ -0,0 +1,183 @@
+// Copyright 2019 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
+//
+// http://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.
+//
+
+syntax = "proto3";
+
+package google.cloud.recaptchaenterprise.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1beta1;recaptchaenterprise";
+option java_multiple_files = true;
+option java_outer_classname = "RecaptchaEnterpriseProto";
+option java_package = "com.google.recaptchaenterprise.v1beta1";
+option objc_class_prefix = "GCRE";
+option php_namespace = "Google\\Cloud\\RecaptchaEnterprise\\V1beta1";
+
+
+// Service to determine the likelihood an event is legitimate.
+service RecaptchaEnterpriseServiceV1Beta1 {
+ // Creates an Assessment of the likelihood an event is legitimate.
+ rpc CreateAssessment(CreateAssessmentRequest) returns (Assessment) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/assessments"
+ body: "assessment"
+ };
+ }
+
+ // Annotates a previously created Assessment to provide additional information
+ // on whether the event turned out to be authentic or fradulent.
+ rpc AnnotateAssessment(AnnotateAssessmentRequest) returns (AnnotateAssessmentResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/assessments/*}:annotate"
+ body: "*"
+ };
+ }
+}
+
+// The create assessment request message.
+message CreateAssessmentRequest {
+ // Required. The name of the project in which the assessment will be created,
+ // in the format "projects/{project_number}".
+ string parent = 1;
+
+ // The asessment details.
+ Assessment assessment = 2;
+}
+
+// The request message to annotate an Assessment.
+message AnnotateAssessmentRequest {
+ // Enum that reprensents the types of annotations.
+ enum Annotation {
+ // Default unspecified type.
+ ANNOTATION_UNSPECIFIED = 0;
+
+ // Provides information that the event turned out to be legitimate.
+ LEGITIMATE = 1;
+
+ // Provides information that the event turned out to be fraudulent.
+ FRAUDULENT = 2;
+ }
+
+ // Required. The resource name of the Assessment, in the format
+ // "projects/{project_number}/assessments/{assessment_id}".
+ string name = 1;
+
+ // The annotation that will be assigned to the Event.
+ Annotation annotation = 2;
+}
+
+// Empty response for AnnotateAssessment.
+message AnnotateAssessmentResponse {
+
+}
+
+// A recaptcha assessment resource.
+message Assessment {
+ // LINT.IfChange(classification_reason)
+ // Reasons contributing to the risk analysis verdict.
+ enum ClassificationReason {
+ // Default unspecified type.
+ CLASSIFICATION_REASON_UNSPECIFIED = 0;
+
+ // The event appeared to be automated.
+ AUTOMATION = 1;
+
+ // The event was not made from the proper context on the real site.
+ UNEXPECTED_ENVIRONMENT = 2;
+
+ // Browsing behavior leading up to the event was generated was out of the
+ // ordinary.
+ UNEXPECTED_USAGE_PATTERNS = 4;
+
+ // Too little traffic has been received from this site thus far to generate
+ // quality risk analysis.
+ PROVISIONAL_RISK_ANALYSIS = 5;
+ }
+
+ // Output only. The resource name for the Assessment in the format
+ // "projects/{project_number}/assessments/{assessment_id}".
+ string name = 1;
+
+ // The event being assessed.
+ Event event = 2;
+
+ // Output only. Legitimate event score from 0.0 to 1.0.
+ // (1.0 means very likely legitimate traffic while 0.0 means very likely
+ // non-legitimate traffic).
+ float score = 3;
+
+ // Output only. Properties of the provided event token.
+ TokenProperties token_properties = 4;
+
+ // Output only. Reasons contributing to the risk analysis verdict.
+ repeated ClassificationReason reasons = 5;
+}
+
+message Event {
+ // The user response token provided by the reCAPTCHA client-side integration
+ // on your site.
+ string token = 1;
+
+ // The site key that was used to invoke reCAPTCHA on your site and generate
+ // the token.
+ string site_key = 2;
+}
+
+message TokenProperties {
+ // Enum that represents the types of invalid token reasons.
+ enum InvalidReason {
+ // Default unspecified type.
+ INVALID_REASON_UNSPECIFIED = 0;
+
+ // If the failure reason was not accounted for.
+ UNKNOWN_INVALID_REASON = 1;
+
+ // The provided user verification token was malformed.
+ MALFORMED = 2;
+
+ // The user verification token had expired.
+ EXPIRED = 3;
+
+ // The user verification had already been seen.
+ DUPE = 4;
+
+ // The user verification token did not match the provided site secret.
+ // This may be a configuration error (e.g. development keys used in
+ // production) or end users trying to use verification tokens from other
+ // sites.
+ SITE_MISMATCH = 5;
+
+ // The user verification token was not present. It is a required input.
+ MISSING = 6;
+ }
+
+ // Output only. Whether the provided user response token is valid.
+ bool valid = 1;
+
+ // Output only. Reason associated with the response when valid = false.
+ InvalidReason invalid_reason = 2;
+
+ // Output only. The timestamp corresponding to the generation of the token.
+ google.protobuf.Timestamp create_time = 3;
+
+ // Output only. The hostname of the page on which the token was generated.
+ string hostname = 4;
+
+ // Output only. Action name provided at token generation.
+ string action = 5;
+}
diff --git a/google-cloud-bom/pom.xml b/google-cloud-bom/pom.xml
index 121eb5a08659..bd2e095768e9 100644
--- a/google-cloud-bom/pom.xml
+++ b/google-cloud-bom/pom.xml
@@ -1060,6 +1060,21 @@
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
+ *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Assessment assessment = Assessment.newBuilder().build();
+ * Assessment response = recaptchaEnterpriseServiceV1Beta1Client.createAssessment(parent, assessment);
+ * }
+ *
+ *
+ *
+ * Note: close() needs to be called on the recaptchaEnterpriseServiceV1Beta1Client object to + * clean up resources such as threads. In the example above, try-with-resources is used, which + * automatically calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of + * RecaptchaEnterpriseServiceV1Beta1Settings to create(). For example: + * + *
To customize credentials: + * + *
+ *
+ * RecaptchaEnterpriseServiceV1Beta1Settings recaptchaEnterpriseServiceV1Beta1Settings =
+ * RecaptchaEnterpriseServiceV1Beta1Settings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client =
+ * RecaptchaEnterpriseServiceV1Beta1Client.create(recaptchaEnterpriseServiceV1Beta1Settings);
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ *
+ * RecaptchaEnterpriseServiceV1Beta1Settings recaptchaEnterpriseServiceV1Beta1Settings =
+ * RecaptchaEnterpriseServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client =
+ * RecaptchaEnterpriseServiceV1Beta1Client.create(recaptchaEnterpriseServiceV1Beta1Settings);
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class RecaptchaEnterpriseServiceV1Beta1Client implements BackgroundResource {
+ private final RecaptchaEnterpriseServiceV1Beta1Settings settings;
+ private final RecaptchaEnterpriseServiceV1Beta1Stub stub;
+
+ /** Constructs an instance of RecaptchaEnterpriseServiceV1Beta1Client with default settings. */
+ public static final RecaptchaEnterpriseServiceV1Beta1Client create() throws IOException {
+ return create(RecaptchaEnterpriseServiceV1Beta1Settings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of RecaptchaEnterpriseServiceV1Beta1Client, using the given settings.
+ * The channels are created based on the settings passed in, or defaults for any settings that are
+ * not set.
+ */
+ public static final RecaptchaEnterpriseServiceV1Beta1Client create(
+ RecaptchaEnterpriseServiceV1Beta1Settings settings) throws IOException {
+ return new RecaptchaEnterpriseServiceV1Beta1Client(settings);
+ }
+
+ /**
+ * Constructs an instance of RecaptchaEnterpriseServiceV1Beta1Client, using the given stub for
+ * making calls. This is for advanced usage - prefer to use
+ * RecaptchaEnterpriseServiceV1Beta1Settings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final RecaptchaEnterpriseServiceV1Beta1Client create(
+ RecaptchaEnterpriseServiceV1Beta1Stub stub) {
+ return new RecaptchaEnterpriseServiceV1Beta1Client(stub);
+ }
+
+ /**
+ * Constructs an instance of RecaptchaEnterpriseServiceV1Beta1Client, using the given settings.
+ * This is protected so that it is easy to make a subclass, but otherwise, the static factory
+ * methods should be preferred.
+ */
+ protected RecaptchaEnterpriseServiceV1Beta1Client(
+ RecaptchaEnterpriseServiceV1Beta1Settings settings) throws IOException {
+ this.settings = settings;
+ this.stub =
+ ((RecaptchaEnterpriseServiceV1Beta1StubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected RecaptchaEnterpriseServiceV1Beta1Client(RecaptchaEnterpriseServiceV1Beta1Stub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final RecaptchaEnterpriseServiceV1Beta1Settings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public RecaptchaEnterpriseServiceV1Beta1Stub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates an Assessment of the likelihood an event is legitimate.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Assessment assessment = Assessment.newBuilder().build();
+ * Assessment response = recaptchaEnterpriseServiceV1Beta1Client.createAssessment(parent, assessment);
+ * }
+ *
+ *
+ * @param parent Required. The name of the project in which the assessment will be created, in the
+ * format "projects/{project_number}".
+ * @param assessment The asessment details.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Assessment createAssessment(ProjectName parent, Assessment assessment) {
+
+ CreateAssessmentRequest request =
+ CreateAssessmentRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setAssessment(assessment)
+ .build();
+ return createAssessment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates an Assessment of the likelihood an event is legitimate.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Assessment assessment = Assessment.newBuilder().build();
+ * Assessment response = recaptchaEnterpriseServiceV1Beta1Client.createAssessment(parent.toString(), assessment);
+ * }
+ *
+ *
+ * @param parent Required. The name of the project in which the assessment will be created, in the
+ * format "projects/{project_number}".
+ * @param assessment The asessment details.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Assessment createAssessment(String parent, Assessment assessment) {
+
+ CreateAssessmentRequest request =
+ CreateAssessmentRequest.newBuilder().setParent(parent).setAssessment(assessment).build();
+ return createAssessment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates an Assessment of the likelihood an event is legitimate.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Assessment assessment = Assessment.newBuilder().build();
+ * CreateAssessmentRequest request = CreateAssessmentRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setAssessment(assessment)
+ * .build();
+ * Assessment response = recaptchaEnterpriseServiceV1Beta1Client.createAssessment(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 Assessment createAssessment(CreateAssessmentRequest request) {
+ return createAssessmentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates an Assessment of the likelihood an event is legitimate.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Assessment assessment = Assessment.newBuilder().build();
+ * CreateAssessmentRequest request = CreateAssessmentRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setAssessment(assessment)
+ * .build();
+ * ApiFuture<Assessment> future = recaptchaEnterpriseServiceV1Beta1Client.createAssessmentCallable().futureCall(request);
+ * // Do something
+ * Assessment response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * AssessmentName name = AssessmentName.of("[PROJECT]", "[ASSESSMENT]");
+ * AnnotateAssessmentRequest.Annotation annotation = AnnotateAssessmentRequest.Annotation.ANNOTATION_UNSPECIFIED;
+ * AnnotateAssessmentResponse response = recaptchaEnterpriseServiceV1Beta1Client.annotateAssessment(name, annotation);
+ * }
+ *
+ *
+ * @param name Required. The resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ * @param annotation The annotation that will be assigned to the Event.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AnnotateAssessmentResponse annotateAssessment(
+ AssessmentName name, AnnotateAssessmentRequest.Annotation annotation) {
+
+ AnnotateAssessmentRequest request =
+ AnnotateAssessmentRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setAnnotation(annotation)
+ .build();
+ return annotateAssessment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Annotates a previously created Assessment to provide additional information on whether the
+ * event turned out to be authentic or fradulent.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * AssessmentName name = AssessmentName.of("[PROJECT]", "[ASSESSMENT]");
+ * AnnotateAssessmentRequest.Annotation annotation = AnnotateAssessmentRequest.Annotation.ANNOTATION_UNSPECIFIED;
+ * AnnotateAssessmentResponse response = recaptchaEnterpriseServiceV1Beta1Client.annotateAssessment(name.toString(), annotation);
+ * }
+ *
+ *
+ * @param name Required. The resource name of the Assessment, in the format
+ * "projects/{project_number}/assessments/{assessment_id}".
+ * @param annotation The annotation that will be assigned to the Event.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AnnotateAssessmentResponse annotateAssessment(
+ String name, AnnotateAssessmentRequest.Annotation annotation) {
+
+ AnnotateAssessmentRequest request =
+ AnnotateAssessmentRequest.newBuilder().setName(name).setAnnotation(annotation).build();
+ return annotateAssessment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Annotates a previously created Assessment to provide additional information on whether the
+ * event turned out to be authentic or fradulent.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * AssessmentName name = AssessmentName.of("[PROJECT]", "[ASSESSMENT]");
+ * AnnotateAssessmentRequest.Annotation annotation = AnnotateAssessmentRequest.Annotation.ANNOTATION_UNSPECIFIED;
+ * AnnotateAssessmentRequest request = AnnotateAssessmentRequest.newBuilder()
+ * .setName(name.toString())
+ * .setAnnotation(annotation)
+ * .build();
+ * AnnotateAssessmentResponse response = recaptchaEnterpriseServiceV1Beta1Client.annotateAssessment(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 AnnotateAssessmentResponse annotateAssessment(AnnotateAssessmentRequest request) {
+ return annotateAssessmentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Annotates a previously created Assessment to provide additional information on whether the
+ * event turned out to be authentic or fradulent.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * AssessmentName name = AssessmentName.of("[PROJECT]", "[ASSESSMENT]");
+ * AnnotateAssessmentRequest.Annotation annotation = AnnotateAssessmentRequest.Annotation.ANNOTATION_UNSPECIFIED;
+ * AnnotateAssessmentRequest request = AnnotateAssessmentRequest.newBuilder()
+ * .setName(name.toString())
+ * .setAnnotation(annotation)
+ * .build();
+ * ApiFuture<AnnotateAssessmentResponse> future = recaptchaEnterpriseServiceV1Beta1Client.annotateAssessmentCallable().futureCall(request);
+ * // Do something
+ * AnnotateAssessmentResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of createAssessment to 30 seconds: + * + *
+ *
+ * RecaptchaEnterpriseServiceV1Beta1Settings.Builder recaptchaEnterpriseServiceV1Beta1SettingsBuilder =
+ * RecaptchaEnterpriseServiceV1Beta1Settings.newBuilder();
+ * recaptchaEnterpriseServiceV1Beta1SettingsBuilder.createAssessmentSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * RecaptchaEnterpriseServiceV1Beta1Settings recaptchaEnterpriseServiceV1Beta1Settings = recaptchaEnterpriseServiceV1Beta1SettingsBuilder.build();
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class RecaptchaEnterpriseServiceV1Beta1Settings
+ extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================================= RecaptchaEnterpriseServiceV1Beta1Client
+ * =======================================
+ *
+ * Service Description: Service to determine the likelihood an event is legitimate.
+ *
+ * Sample for RecaptchaEnterpriseServiceV1Beta1Client:
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator")
+@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+public class GrpcRecaptchaEnterpriseServiceV1Beta1CallableFactory
+ implements GrpcStubCallableFactory {
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public class GrpcRecaptchaEnterpriseServiceV1Beta1Stub
+ extends RecaptchaEnterpriseServiceV1Beta1Stub {
+
+ private static final MethodDescriptor This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public abstract class RecaptchaEnterpriseServiceV1Beta1Stub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object. For
+ * example, to set the total timeout of createAssessment to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction
+ *
+ */
+package com.google.cloud.recaptchaenterprise.v1beta1;
diff --git a/google-cloud-clients/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/stub/GrpcRecaptchaEnterpriseServiceV1Beta1CallableFactory.java b/google-cloud-clients/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/stub/GrpcRecaptchaEnterpriseServiceV1Beta1CallableFactory.java
new file mode 100644
index 000000000000..691c3f51fb0c
--- /dev/null
+++ b/google-cloud-clients/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/stub/GrpcRecaptchaEnterpriseServiceV1Beta1CallableFactory.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2019 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.v1beta1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * gRPC callable factory implementation for reCAPTCHA Enterprise API.
+ *
+ *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Assessment assessment = Assessment.newBuilder().build();
+ * Assessment response = recaptchaEnterpriseServiceV1Beta1Client.createAssessment(parent, assessment);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class RecaptchaEnterpriseServiceV1Beta1StubSettings
+ extends StubSettings
+ * RecaptchaEnterpriseServiceV1Beta1StubSettings.Builder recaptchaEnterpriseServiceV1Beta1SettingsBuilder =
+ * RecaptchaEnterpriseServiceV1Beta1StubSettings.newBuilder();
+ * recaptchaEnterpriseServiceV1Beta1SettingsBuilder.createAssessmentSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * RecaptchaEnterpriseServiceV1Beta1StubSettings recaptchaEnterpriseServiceV1Beta1Settings = recaptchaEnterpriseServiceV1Beta1SettingsBuilder.build();
+ *
+ *