diff --git a/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java b/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java index a18175cd..ea728ad4 100644 --- a/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java +++ b/google-cloud-recaptchaenterprise/src/main/java/com/google/cloud/recaptchaenterprise/v1beta1/RecaptchaEnterpriseServiceV1Beta1Client.java @@ -15,18 +15,35 @@ */ package com.google.cloud.recaptchaenterprise.v1beta1; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.recaptchaenterprise.v1beta1.stub.RecaptchaEnterpriseServiceV1Beta1Stub; import com.google.cloud.recaptchaenterprise.v1beta1.stub.RecaptchaEnterpriseServiceV1Beta1StubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; import com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest; import com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse; import com.google.recaptchaenterprise.v1beta1.Assessment; import com.google.recaptchaenterprise.v1beta1.AssessmentName; import com.google.recaptchaenterprise.v1beta1.CreateAssessmentRequest; +import com.google.recaptchaenterprise.v1beta1.CreateKeyRequest; +import com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest; +import com.google.recaptchaenterprise.v1beta1.GetKeyRequest; +import com.google.recaptchaenterprise.v1beta1.Key; +import com.google.recaptchaenterprise.v1beta1.ListKeysRequest; +import com.google.recaptchaenterprise.v1beta1.ListKeysResponse; import com.google.recaptchaenterprise.v1beta1.ProjectName; +import com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest; import java.io.IOException; +import java.util.List; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -372,6 +389,270 @@ public final AnnotateAssessmentResponse annotateAssessment(AnnotateAssessmentReq return stub.annotateAssessmentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new reCAPTCHA Enterprise key. + * + *
Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Key key = Key.newBuilder().build();
+ * CreateKeyRequest request = CreateKeyRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setKey(key)
+ * .build();
+ * Key response = recaptchaEnterpriseServiceV1Beta1Client.createKey(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 Key createKey(CreateKeyRequest request) {
+ return createKeyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new reCAPTCHA Enterprise key.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * Key key = Key.newBuilder().build();
+ * CreateKeyRequest request = CreateKeyRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setKey(key)
+ * .build();
+ * ApiFuture<Key> future = recaptchaEnterpriseServiceV1Beta1Client.createKeyCallable().futureCall(request);
+ * // Do something
+ * Key response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListKeysRequest request = ListKeysRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * for (Key element : recaptchaEnterpriseServiceV1Beta1Client.listKeys(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @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 ListKeysPagedResponse listKeys(ListKeysRequest request) {
+ return listKeysPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Returns the list of all keys that belong to a project.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListKeysRequest request = ListKeysRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListKeysPagedResponse> future = recaptchaEnterpriseServiceV1Beta1Client.listKeysPagedCallable().futureCall(request);
+ * // Do something
+ * for (Key element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListKeysRequest request = ListKeysRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListKeysResponse response = recaptchaEnterpriseServiceV1Beta1Client.listKeysCallable().call(request);
+ * for (Key element : response.getKeysList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * KeyName name = KeyName.of("[PROJECT]", "[KEY]");
+ * GetKeyRequest request = GetKeyRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * Key response = recaptchaEnterpriseServiceV1Beta1Client.getKey(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 Key getKey(GetKeyRequest request) {
+ return getKeyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Returns the specified key.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * KeyName name = KeyName.of("[PROJECT]", "[KEY]");
+ * GetKeyRequest request = GetKeyRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Key> future = recaptchaEnterpriseServiceV1Beta1Client.getKeyCallable().futureCall(request);
+ * // Do something
+ * Key response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * KeyName key = KeyName.of("[PROJECT]", "[KEY]");
+ * UpdateKeyRequest request = UpdateKeyRequest.newBuilder()
+ * .setKey(key.toString())
+ * .build();
+ * Key response = recaptchaEnterpriseServiceV1Beta1Client.updateKey(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 Key updateKey(UpdateKeyRequest request) {
+ return updateKeyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates the specified key.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * KeyName key = KeyName.of("[PROJECT]", "[KEY]");
+ * UpdateKeyRequest request = UpdateKeyRequest.newBuilder()
+ * .setKey(key.toString())
+ * .build();
+ * ApiFuture<Key> future = recaptchaEnterpriseServiceV1Beta1Client.updateKeyCallable().futureCall(request);
+ * // Do something
+ * Key response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * KeyName name = KeyName.of("[PROJECT]", "[KEY]");
+ * DeleteKeyRequest request = DeleteKeyRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * recaptchaEnterpriseServiceV1Beta1Client.deleteKey(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 void deleteKey(DeleteKeyRequest request) {
+ deleteKeyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes the specified key.
+ *
+ * Sample code: + * + *
+ * try (RecaptchaEnterpriseServiceV1Beta1Client recaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client.create()) {
+ * KeyName name = KeyName.of("[PROJECT]", "[KEY]");
+ * DeleteKeyRequest request = DeleteKeyRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = recaptchaEnterpriseServiceV1Beta1Client.deleteKeyCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable+ * Creates a new reCAPTCHA Enterprise key. + *+ */ + public void createKey( + com.google.recaptchaenterprise.v1beta1.CreateKeyRequest request, + io.grpc.stub.StreamObserver
+ * Returns the list of all keys that belong to a project. + *+ */ + public void listKeys( + com.google.recaptchaenterprise.v1beta1.ListKeysRequest request, + io.grpc.stub.StreamObserver
+ * Returns the specified key. + *+ */ + public void getKey( + com.google.recaptchaenterprise.v1beta1.GetKeyRequest request, + io.grpc.stub.StreamObserver
+ * Updates the specified key. + *+ */ + public void updateKey( + com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest request, + io.grpc.stub.StreamObserver
+ * Deletes the specified key. + *+ */ + public void deleteKey( + com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest request, + io.grpc.stub.StreamObserver
+ * Creates a new reCAPTCHA Enterprise key. + *+ */ + public void createKey( + com.google.recaptchaenterprise.v1beta1.CreateKeyRequest request, + io.grpc.stub.StreamObserver
+ * Returns the list of all keys that belong to a project. + *+ */ + public void listKeys( + com.google.recaptchaenterprise.v1beta1.ListKeysRequest request, + io.grpc.stub.StreamObserver
+ * Returns the specified key. + *+ */ + public void getKey( + com.google.recaptchaenterprise.v1beta1.GetKeyRequest request, + io.grpc.stub.StreamObserver
+ * Updates the specified key. + *+ */ + public void updateKey( + com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest request, + io.grpc.stub.StreamObserver
+ * Deletes the specified key. + *+ */ + public void deleteKey( + com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest request, + io.grpc.stub.StreamObserver
+ * Creates a new reCAPTCHA Enterprise key. + *+ */ + public com.google.recaptchaenterprise.v1beta1.Key createKey( + com.google.recaptchaenterprise.v1beta1.CreateKeyRequest request) { + return blockingUnaryCall(getChannel(), getCreateKeyMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Returns the list of all keys that belong to a project. + *+ */ + public com.google.recaptchaenterprise.v1beta1.ListKeysResponse listKeys( + com.google.recaptchaenterprise.v1beta1.ListKeysRequest request) { + return blockingUnaryCall(getChannel(), getListKeysMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Returns the specified key. + *+ */ + public com.google.recaptchaenterprise.v1beta1.Key getKey( + com.google.recaptchaenterprise.v1beta1.GetKeyRequest request) { + return blockingUnaryCall(getChannel(), getGetKeyMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Updates the specified key. + *+ */ + public com.google.recaptchaenterprise.v1beta1.Key updateKey( + com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest request) { + return blockingUnaryCall(getChannel(), getUpdateKeyMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Deletes the specified key. + *+ */ + public com.google.protobuf.Empty deleteKey( + com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest request) { + return blockingUnaryCall(getChannel(), getDeleteKeyMethodHelper(), getCallOptions(), request); + } } /** @@ -415,10 +950,84 @@ protected RecaptchaEnterpriseServiceV1Beta1FutureStub build( return futureUnaryCall( getChannel().newCall(getAnnotateAssessmentMethodHelper(), getCallOptions()), request); } + + /** + * + * + *
+ * Creates a new reCAPTCHA Enterprise key. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1beta1.Key> + createKey(com.google.recaptchaenterprise.v1beta1.CreateKeyRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateKeyMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Returns the list of all keys that belong to a project. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1beta1.ListKeysResponse> + listKeys(com.google.recaptchaenterprise.v1beta1.ListKeysRequest request) { + return futureUnaryCall( + getChannel().newCall(getListKeysMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Returns the specified key. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1beta1.Key> + getKey(com.google.recaptchaenterprise.v1beta1.GetKeyRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetKeyMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Updates the specified key. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.recaptchaenterprise.v1beta1.Key> + updateKey(com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateKeyMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Deletes the specified key. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Settings specific to keys that can be used by Android apps. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings} + */ +public final class AndroidKeySettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings) + AndroidKeySettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AndroidKeySettings.newBuilder() to construct. + private AndroidKeySettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AndroidKeySettings() { + allowedPackageNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AndroidKeySettings( + 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(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowedPackageNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + allowedPackageNames_.add(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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + allowedPackageNames_ = allowedPackageNames_.getUnmodifiableView(); + } + 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_AndroidKeySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_AndroidKeySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.class, + com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.Builder.class); + } + + public static final int ALLOWED_PACKAGE_NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList allowedPackageNames_; + /** + * + * + *
+ * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getAllowedPackageNamesList() {
+ return allowedPackageNames_;
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public int getAllowedPackageNamesCount() {
+ return allowedPackageNames_.size();
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public java.lang.String getAllowedPackageNames(int index) {
+ return allowedPackageNames_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public com.google.protobuf.ByteString getAllowedPackageNamesBytes(int index) {
+ return allowedPackageNames_.getByteString(index);
+ }
+
+ 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 {
+ for (int i = 0; i < allowedPackageNames_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allowedPackageNames_.getRaw(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < allowedPackageNames_.size(); i++) {
+ dataSize += computeStringSizeNoTag(allowedPackageNames_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getAllowedPackageNamesList().size();
+ }
+ 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.AndroidKeySettings)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings other =
+ (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) obj;
+
+ if (!getAllowedPackageNamesList().equals(other.getAllowedPackageNamesList())) 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();
+ if (getAllowedPackageNamesCount() > 0) {
+ hash = (37 * hash) + ALLOWED_PACKAGE_NAMES_FIELD_NUMBER;
+ hash = (53 * hash) + getAllowedPackageNamesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AndroidKeySettings parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AndroidKeySettings 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.AndroidKeySettings parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AndroidKeySettings 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.AndroidKeySettings parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AndroidKeySettings parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AndroidKeySettings parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AndroidKeySettings 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.AndroidKeySettings parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AndroidKeySettings 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.AndroidKeySettings parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AndroidKeySettings 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.AndroidKeySettings 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;
+ }
+ /**
+ *
+ *
+ * + * Settings specific to keys that can be used by Android apps. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getAllowedPackageNamesList() {
+ return allowedPackageNames_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public int getAllowedPackageNamesCount() {
+ return allowedPackageNames_.size();
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public java.lang.String getAllowedPackageNames(int index) {
+ return allowedPackageNames_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public com.google.protobuf.ByteString getAllowedPackageNamesBytes(int index) {
+ return allowedPackageNames_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public Builder setAllowedPackageNames(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAllowedPackageNamesIsMutable();
+ allowedPackageNames_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public Builder addAllowedPackageNames(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAllowedPackageNamesIsMutable();
+ allowedPackageNames_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public Builder addAllAllowedPackageNames(java.lang.Iterable+ * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public Builder clearAllowedPackageNames() {
+ allowedPackageNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ public Builder addAllowedPackageNamesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureAllowedPackageNamesIsMutable();
+ allowedPackageNames_.add(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.AndroidKeySettings)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings)
+ private static final com.google.recaptchaenterprise.v1beta1.AndroidKeySettings DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.AndroidKeySettings();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.AndroidKeySettings getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ java.util.List+ * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ int getAllowedPackageNamesCount();
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ java.lang.String getAllowedPackageNames(int index);
+ /**
+ *
+ *
+ * + * Android package names of apps allowed to use the key. + * Example: 'com.companyname.appname' + *+ * + *
repeated string allowed_package_names = 1;
+ */
+ com.google.protobuf.ByteString getAllowedPackageNamesBytes(int index);
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateKeyRequest.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateKeyRequest.java
new file mode 100644
index 00000000..4689ead0
--- /dev/null
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/CreateKeyRequest.java
@@ -0,0 +1,923 @@
+/*
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * The create key request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.CreateKeyRequest} + */ +public final class CreateKeyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.CreateKeyRequest) + CreateKeyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateKeyRequest.newBuilder() to construct. + private CreateKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CreateKeyRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateKeyRequest( + 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.Key.Builder subBuilder = null; + if (key_ != null) { + subBuilder = key_.toBuilder(); + } + key_ = + input.readMessage( + com.google.recaptchaenterprise.v1beta1.Key.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(key_); + key_ = 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_CreateKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_CreateKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.CreateKeyRequest.class, + com.google.recaptchaenterprise.v1beta1.CreateKeyRequest.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 key will be created, in the + * format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 key will be created, in the + * format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 KEY_FIELD_NUMBER = 2;
+ private com.google.recaptchaenterprise.v1beta1.Key key_;
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public boolean hasKey() {
+ return key_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key getKey() {
+ return key_ == null ? com.google.recaptchaenterprise.v1beta1.Key.getDefaultInstance() : key_;
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.KeyOrBuilder getKeyOrBuilder() {
+ return getKey();
+ }
+
+ 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 (key_ != null) {
+ output.writeMessage(2, getKey());
+ }
+ 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 (key_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKey());
+ }
+ 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.CreateKeyRequest)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.CreateKeyRequest other =
+ (com.google.recaptchaenterprise.v1beta1.CreateKeyRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (hasKey() != other.hasKey()) return false;
+ if (hasKey()) {
+ if (!getKey().equals(other.getKey())) 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 (hasKey()) {
+ hash = (37 * hash) + KEY_FIELD_NUMBER;
+ hash = (53 * hash) + getKey().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateKeyRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateKeyRequest 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.CreateKeyRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateKeyRequest 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.CreateKeyRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateKeyRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateKeyRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateKeyRequest 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.CreateKeyRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateKeyRequest 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.CreateKeyRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateKeyRequest 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.CreateKeyRequest 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 key request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.CreateKeyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the project in which the key will be created, in the + * format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 key will be created, in the + * format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 key will be created, in the + * format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 key will be created, in the + * format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the project in which the key will be created, in the + * format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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.Key key_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Key,
+ com.google.recaptchaenterprise.v1beta1.Key.Builder,
+ com.google.recaptchaenterprise.v1beta1.KeyOrBuilder>
+ keyBuilder_;
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public boolean hasKey() {
+ return keyBuilder_ != null || key_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key getKey() {
+ if (keyBuilder_ == null) {
+ return key_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Key.getDefaultInstance()
+ : key_;
+ } else {
+ return keyBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setKey(com.google.recaptchaenterprise.v1beta1.Key value) {
+ if (keyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ key_ = value;
+ onChanged();
+ } else {
+ keyBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setKey(com.google.recaptchaenterprise.v1beta1.Key.Builder builderForValue) {
+ if (keyBuilder_ == null) {
+ key_ = builderForValue.build();
+ onChanged();
+ } else {
+ keyBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder mergeKey(com.google.recaptchaenterprise.v1beta1.Key value) {
+ if (keyBuilder_ == null) {
+ if (key_ != null) {
+ key_ =
+ com.google.recaptchaenterprise.v1beta1.Key.newBuilder(key_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ key_ = value;
+ }
+ onChanged();
+ } else {
+ keyBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearKey() {
+ if (keyBuilder_ == null) {
+ key_ = null;
+ onChanged();
+ } else {
+ key_ = null;
+ keyBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key.Builder getKeyBuilder() {
+
+ onChanged();
+ return getKeyFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.KeyOrBuilder getKeyOrBuilder() {
+ if (keyBuilder_ != null) {
+ return keyBuilder_.getMessageOrBuilder();
+ } else {
+ return key_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Key.getDefaultInstance()
+ : key_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Key,
+ com.google.recaptchaenterprise.v1beta1.Key.Builder,
+ com.google.recaptchaenterprise.v1beta1.KeyOrBuilder>
+ getKeyFieldBuilder() {
+ if (keyBuilder_ == null) {
+ keyBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Key,
+ com.google.recaptchaenterprise.v1beta1.Key.Builder,
+ com.google.recaptchaenterprise.v1beta1.KeyOrBuilder>(
+ getKey(), getParentForChildren(), isClean());
+ key_ = null;
+ }
+ return keyBuilder_;
+ }
+
+ @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.CreateKeyRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.CreateKeyRequest)
+ private static final com.google.recaptchaenterprise.v1beta1.CreateKeyRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.CreateKeyRequest();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.CreateKeyRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The name of the project in which the key will be created, in the + * format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Required. The name of the project in which the key will be created, in the + * format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ boolean hasKey();
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.recaptchaenterprise.v1beta1.Key getKey();
+ /**
+ *
+ *
+ * + * Required. Information to create a reCAPTCHA Enterprise key. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.recaptchaenterprise.v1beta1.KeyOrBuilder getKeyOrBuilder();
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/DeleteKeyRequest.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/DeleteKeyRequest.java
new file mode 100644
index 00000000..b49f007f
--- /dev/null
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/DeleteKeyRequest.java
@@ -0,0 +1,635 @@
+/*
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * The delete key request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.DeleteKeyRequest} + */ +public final class DeleteKeyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.DeleteKeyRequest) + DeleteKeyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteKeyRequest.newBuilder() to construct. + private DeleteKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DeleteKeyRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteKeyRequest( + 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; + } + 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_DeleteKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_DeleteKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest.class, + com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * Required. The name of the key to be deleted, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 name of the key to be deleted, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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;
+ }
+ }
+
+ 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_);
+ }
+ 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_);
+ }
+ 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.DeleteKeyRequest)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest other =
+ (com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest) obj;
+
+ if (!getName().equals(other.getName())) 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 = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest 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.DeleteKeyRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest 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.DeleteKeyRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest 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.DeleteKeyRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest 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.DeleteKeyRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest 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.DeleteKeyRequest 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 delete key request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.DeleteKeyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the key to be deleted, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 name of the key to be deleted, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 name of the key to be deleted, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the key to be deleted, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the key to be deleted, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = 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.DeleteKeyRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.DeleteKeyRequest)
+ private static final com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.DeleteKeyRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The name of the key to be deleted, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Required. The name of the key to be deleted, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ com.google.protobuf.ByteString getNameBytes();
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Event.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Event.java
index 6c1852d1..9d83e6ad 100644
--- a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Event.java
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Event.java
@@ -32,6 +32,9 @@ private Event(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
private Event() {
token_ = "";
siteKey_ = "";
+ userAgent_ = "";
+ userIpAddress_ = "";
+ expectedAction_ = "";
}
@java.lang.Override
@@ -72,6 +75,27 @@ private Event(
siteKey_ = s;
break;
}
+ case 26:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ userAgent_ = s;
+ break;
+ }
+ case 34:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ userIpAddress_ = s;
+ break;
+ }
+ case 42:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ expectedAction_ = s;
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -112,11 +136,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* - * Required. The user response token provided by the reCAPTCHA client-side integration + * Optional. The user response token provided by the reCAPTCHA client-side integration * on your site. ** - *
string token = 1 [(.google.api.field_behavior) = REQUIRED];
+ * string token = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
public java.lang.String getToken() {
java.lang.Object ref = token_;
@@ -133,11 +157,11 @@ public java.lang.String getToken() {
*
*
* - * Required. The user response token provided by the reCAPTCHA client-side integration + * Optional. The user response token provided by the reCAPTCHA client-side integration * on your site. ** - *
string token = 1 [(.google.api.field_behavior) = REQUIRED];
+ * string token = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
public com.google.protobuf.ByteString getTokenBytes() {
java.lang.Object ref = token_;
@@ -157,11 +181,11 @@ public com.google.protobuf.ByteString getTokenBytes() {
*
*
* - * Required. The site key that was used to invoke reCAPTCHA on your site and generate + * Optional. The site key that was used to invoke reCAPTCHA on your site and generate * the token. ** - *
string site_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
public java.lang.String getSiteKey() {
java.lang.Object ref = siteKey_;
@@ -178,11 +202,11 @@ public java.lang.String getSiteKey() {
*
*
* - * Required. The site key that was used to invoke reCAPTCHA on your site and generate + * Optional. The site key that was used to invoke reCAPTCHA on your site and generate * the token. ** - *
string site_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
public com.google.protobuf.ByteString getSiteKeyBytes() {
java.lang.Object ref = siteKey_;
@@ -196,6 +220,141 @@ public com.google.protobuf.ByteString getSiteKeyBytes() {
}
}
+ public static final int USER_AGENT_FIELD_NUMBER = 3;
+ private volatile java.lang.Object userAgent_;
+ /**
+ *
+ *
+ * + * Optional. The user agent present in the request from the user's device related to + * this event. + *+ * + *
string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public java.lang.String getUserAgent() {
+ java.lang.Object ref = userAgent_;
+ 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();
+ userAgent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The user agent present in the request from the user's device related to + * this event. + *+ * + *
string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public com.google.protobuf.ByteString getUserAgentBytes() {
+ java.lang.Object ref = userAgent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ userAgent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int USER_IP_ADDRESS_FIELD_NUMBER = 4;
+ private volatile java.lang.Object userIpAddress_;
+ /**
+ *
+ *
+ * + * Optional. The IP address in the request from the user's device related to this event. + *+ * + *
string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public java.lang.String getUserIpAddress() {
+ java.lang.Object ref = userIpAddress_;
+ 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();
+ userIpAddress_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The IP address in the request from the user's device related to this event. + *+ * + *
string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public com.google.protobuf.ByteString getUserIpAddressBytes() {
+ java.lang.Object ref = userIpAddress_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ userIpAddress_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int EXPECTED_ACTION_FIELD_NUMBER = 5;
+ private volatile java.lang.Object expectedAction_;
+ /**
+ *
+ *
+ * + * Optional. The expected action for this type of event. This should be the same action + * provided at token generation time on client-side platforms already + * integrated with recaptcha enterprise. + *+ * + *
string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public java.lang.String getExpectedAction() {
+ java.lang.Object ref = expectedAction_;
+ 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();
+ expectedAction_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The expected action for this type of event. This should be the same action + * provided at token generation time on client-side platforms already + * integrated with recaptcha enterprise. + *+ * + *
string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public com.google.protobuf.ByteString getExpectedActionBytes() {
+ java.lang.Object ref = expectedAction_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ expectedAction_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -216,6 +375,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!getSiteKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteKey_);
}
+ if (!getUserAgentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userAgent_);
+ }
+ if (!getUserIpAddressBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userIpAddress_);
+ }
+ if (!getExpectedActionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, expectedAction_);
+ }
unknownFields.writeTo(output);
}
@@ -231,6 +399,15 @@ public int getSerializedSize() {
if (!getSiteKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteKey_);
}
+ if (!getUserAgentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userAgent_);
+ }
+ if (!getUserIpAddressBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userIpAddress_);
+ }
+ if (!getExpectedActionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, expectedAction_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -249,6 +426,9 @@ public boolean equals(final java.lang.Object obj) {
if (!getToken().equals(other.getToken())) return false;
if (!getSiteKey().equals(other.getSiteKey())) return false;
+ if (!getUserAgent().equals(other.getUserAgent())) return false;
+ if (!getUserIpAddress().equals(other.getUserIpAddress())) return false;
+ if (!getExpectedAction().equals(other.getExpectedAction())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -264,6 +444,12 @@ public int hashCode() {
hash = (53 * hash) + getToken().hashCode();
hash = (37 * hash) + SITE_KEY_FIELD_NUMBER;
hash = (53 * hash) + getSiteKey().hashCode();
+ hash = (37 * hash) + USER_AGENT_FIELD_NUMBER;
+ hash = (53 * hash) + getUserAgent().hashCode();
+ hash = (37 * hash) + USER_IP_ADDRESS_FIELD_NUMBER;
+ hash = (53 * hash) + getUserIpAddress().hashCode();
+ hash = (37 * hash) + EXPECTED_ACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getExpectedAction().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -405,6 +591,12 @@ public Builder clear() {
siteKey_ = "";
+ userAgent_ = "";
+
+ userIpAddress_ = "";
+
+ expectedAction_ = "";
+
return this;
}
@@ -434,6 +626,9 @@ public com.google.recaptchaenterprise.v1beta1.Event buildPartial() {
new com.google.recaptchaenterprise.v1beta1.Event(this);
result.token_ = token_;
result.siteKey_ = siteKey_;
+ result.userAgent_ = userAgent_;
+ result.userIpAddress_ = userIpAddress_;
+ result.expectedAction_ = expectedAction_;
onBuilt();
return result;
}
@@ -491,6 +686,18 @@ public Builder mergeFrom(com.google.recaptchaenterprise.v1beta1.Event other) {
siteKey_ = other.siteKey_;
onChanged();
}
+ if (!other.getUserAgent().isEmpty()) {
+ userAgent_ = other.userAgent_;
+ onChanged();
+ }
+ if (!other.getUserIpAddress().isEmpty()) {
+ userIpAddress_ = other.userIpAddress_;
+ onChanged();
+ }
+ if (!other.getExpectedAction().isEmpty()) {
+ expectedAction_ = other.expectedAction_;
+ onChanged();
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -525,11 +732,11 @@ public Builder mergeFrom(
*
*
* - * Required. The user response token provided by the reCAPTCHA client-side integration + * Optional. The user response token provided by the reCAPTCHA client-side integration * on your site. ** - *
string token = 1 [(.google.api.field_behavior) = REQUIRED];
+ * string token = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
public java.lang.String getToken() {
java.lang.Object ref = token_;
@@ -546,11 +753,11 @@ public java.lang.String getToken() {
*
*
* - * Required. The user response token provided by the reCAPTCHA client-side integration + * Optional. The user response token provided by the reCAPTCHA client-side integration * on your site. ** - *
string token = 1 [(.google.api.field_behavior) = REQUIRED];
+ * string token = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
public com.google.protobuf.ByteString getTokenBytes() {
java.lang.Object ref = token_;
@@ -567,11 +774,11 @@ public com.google.protobuf.ByteString getTokenBytes() {
*
*
* - * Required. The user response token provided by the reCAPTCHA client-side integration + * Optional. The user response token provided by the reCAPTCHA client-side integration * on your site. ** - *
string token = 1 [(.google.api.field_behavior) = REQUIRED];
+ * string token = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
public Builder setToken(java.lang.String value) {
if (value == null) {
@@ -586,11 +793,11 @@ public Builder setToken(java.lang.String value) {
*
*
* - * Required. The user response token provided by the reCAPTCHA client-side integration + * Optional. The user response token provided by the reCAPTCHA client-side integration * on your site. ** - *
string token = 1 [(.google.api.field_behavior) = REQUIRED];
+ * string token = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
public Builder clearToken() {
@@ -602,11 +809,11 @@ public Builder clearToken() {
*
*
* - * Required. The user response token provided by the reCAPTCHA client-side integration + * Optional. The user response token provided by the reCAPTCHA client-side integration * on your site. ** - *
string token = 1 [(.google.api.field_behavior) = REQUIRED];
+ * string token = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
public Builder setTokenBytes(com.google.protobuf.ByteString value) {
if (value == null) {
@@ -624,11 +831,11 @@ public Builder setTokenBytes(com.google.protobuf.ByteString value) {
*
*
* - * Required. The site key that was used to invoke reCAPTCHA on your site and generate + * Optional. The site key that was used to invoke reCAPTCHA on your site and generate * the token. ** - *
string site_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
public java.lang.String getSiteKey() {
java.lang.Object ref = siteKey_;
@@ -645,11 +852,11 @@ public java.lang.String getSiteKey() {
*
*
* - * Required. The site key that was used to invoke reCAPTCHA on your site and generate + * Optional. The site key that was used to invoke reCAPTCHA on your site and generate * the token. ** - *
string site_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
public com.google.protobuf.ByteString getSiteKeyBytes() {
java.lang.Object ref = siteKey_;
@@ -666,11 +873,11 @@ public com.google.protobuf.ByteString getSiteKeyBytes() {
*
*
* - * Required. The site key that was used to invoke reCAPTCHA on your site and generate + * Optional. The site key that was used to invoke reCAPTCHA on your site and generate * the token. ** - *
string site_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
public Builder setSiteKey(java.lang.String value) {
if (value == null) {
@@ -685,11 +892,11 @@ public Builder setSiteKey(java.lang.String value) {
*
*
* - * Required. The site key that was used to invoke reCAPTCHA on your site and generate + * Optional. The site key that was used to invoke reCAPTCHA on your site and generate * the token. ** - *
string site_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
public Builder clearSiteKey() {
@@ -701,11 +908,11 @@ public Builder clearSiteKey() {
*
*
* - * Required. The site key that was used to invoke reCAPTCHA on your site and generate + * Optional. The site key that was used to invoke reCAPTCHA on your site and generate * the token. ** - *
string site_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
public Builder setSiteKeyBytes(com.google.protobuf.ByteString value) {
if (value == null) {
@@ -718,6 +925,303 @@ public Builder setSiteKeyBytes(com.google.protobuf.ByteString value) {
return this;
}
+ private java.lang.Object userAgent_ = "";
+ /**
+ *
+ *
+ * + * Optional. The user agent present in the request from the user's device related to + * this event. + *+ * + *
string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public java.lang.String getUserAgent() {
+ java.lang.Object ref = userAgent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ userAgent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The user agent present in the request from the user's device related to + * this event. + *+ * + *
string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public com.google.protobuf.ByteString getUserAgentBytes() {
+ java.lang.Object ref = userAgent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ userAgent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The user agent present in the request from the user's device related to + * this event. + *+ * + *
string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder setUserAgent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ userAgent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The user agent present in the request from the user's device related to + * this event. + *+ * + *
string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder clearUserAgent() {
+
+ userAgent_ = getDefaultInstance().getUserAgent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The user agent present in the request from the user's device related to + * this event. + *+ * + *
string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder setUserAgentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ userAgent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object userIpAddress_ = "";
+ /**
+ *
+ *
+ * + * Optional. The IP address in the request from the user's device related to this event. + *+ * + *
string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public java.lang.String getUserIpAddress() {
+ java.lang.Object ref = userIpAddress_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ userIpAddress_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The IP address in the request from the user's device related to this event. + *+ * + *
string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public com.google.protobuf.ByteString getUserIpAddressBytes() {
+ java.lang.Object ref = userIpAddress_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ userIpAddress_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The IP address in the request from the user's device related to this event. + *+ * + *
string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder setUserIpAddress(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ userIpAddress_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The IP address in the request from the user's device related to this event. + *+ * + *
string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder clearUserIpAddress() {
+
+ userIpAddress_ = getDefaultInstance().getUserIpAddress();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The IP address in the request from the user's device related to this event. + *+ * + *
string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder setUserIpAddressBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ userIpAddress_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object expectedAction_ = "";
+ /**
+ *
+ *
+ * + * Optional. The expected action for this type of event. This should be the same action + * provided at token generation time on client-side platforms already + * integrated with recaptcha enterprise. + *+ * + *
string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public java.lang.String getExpectedAction() {
+ java.lang.Object ref = expectedAction_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ expectedAction_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The expected action for this type of event. This should be the same action + * provided at token generation time on client-side platforms already + * integrated with recaptcha enterprise. + *+ * + *
string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public com.google.protobuf.ByteString getExpectedActionBytes() {
+ java.lang.Object ref = expectedAction_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ expectedAction_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The expected action for this type of event. This should be the same action + * provided at token generation time on client-side platforms already + * integrated with recaptcha enterprise. + *+ * + *
string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder setExpectedAction(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ expectedAction_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The expected action for this type of event. This should be the same action + * provided at token generation time on client-side platforms already + * integrated with recaptcha enterprise. + *+ * + *
string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder clearExpectedAction() {
+
+ expectedAction_ = getDefaultInstance().getExpectedAction();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The expected action for this type of event. This should be the same action + * provided at token generation time on client-side platforms already + * integrated with recaptcha enterprise. + *+ * + *
string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder setExpectedActionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ expectedAction_ = value;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/EventOrBuilder.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/EventOrBuilder.java
index be832353..4b1d6dee 100644
--- a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/EventOrBuilder.java
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/EventOrBuilder.java
@@ -27,22 +27,22 @@ public interface EventOrBuilder
*
*
* - * Required. The user response token provided by the reCAPTCHA client-side integration + * Optional. The user response token provided by the reCAPTCHA client-side integration * on your site. ** - *
string token = 1 [(.google.api.field_behavior) = REQUIRED];
+ * string token = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
java.lang.String getToken();
/**
*
*
* - * Required. The user response token provided by the reCAPTCHA client-side integration + * Optional. The user response token provided by the reCAPTCHA client-side integration * on your site. ** - *
string token = 1 [(.google.api.field_behavior) = REQUIRED];
+ * string token = 1 [(.google.api.field_behavior) = OPTIONAL];
*/
com.google.protobuf.ByteString getTokenBytes();
@@ -50,22 +50,91 @@ public interface EventOrBuilder
*
*
* - * Required. The site key that was used to invoke reCAPTCHA on your site and generate + * Optional. The site key that was used to invoke reCAPTCHA on your site and generate * the token. ** - *
string site_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
java.lang.String getSiteKey();
/**
*
*
* - * Required. The site key that was used to invoke reCAPTCHA on your site and generate + * Optional. The site key that was used to invoke reCAPTCHA on your site and generate * the token. ** - *
string site_key = 2 [(.google.api.field_behavior) = REQUIRED];
+ * string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
com.google.protobuf.ByteString getSiteKeyBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The user agent present in the request from the user's device related to + * this event. + *+ * + *
string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.lang.String getUserAgent();
+ /**
+ *
+ *
+ * + * Optional. The user agent present in the request from the user's device related to + * this event. + *+ * + *
string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ com.google.protobuf.ByteString getUserAgentBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The IP address in the request from the user's device related to this event. + *+ * + *
string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.lang.String getUserIpAddress();
+ /**
+ *
+ *
+ * + * Optional. The IP address in the request from the user's device related to this event. + *+ * + *
string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ com.google.protobuf.ByteString getUserIpAddressBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The expected action for this type of event. This should be the same action + * provided at token generation time on client-side platforms already + * integrated with recaptcha enterprise. + *+ * + *
string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.lang.String getExpectedAction();
+ /**
+ *
+ *
+ * + * Optional. The expected action for this type of event. This should be the same action + * provided at token generation time on client-side platforms already + * integrated with recaptcha enterprise. + *+ * + *
string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ com.google.protobuf.ByteString getExpectedActionBytes();
}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/GetKeyRequest.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/GetKeyRequest.java
new file mode 100644
index 00000000..facd6709
--- /dev/null
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/GetKeyRequest.java
@@ -0,0 +1,634 @@
+/*
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * The get key request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.GetKeyRequest} + */ +public final class GetKeyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.GetKeyRequest) + GetKeyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetKeyRequest.newBuilder() to construct. + private GetKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private GetKeyRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetKeyRequest( + 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; + } + 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_GetKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_GetKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.GetKeyRequest.class, + com.google.recaptchaenterprise.v1beta1.GetKeyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * Required. The name of the requested key, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 name of the requested key, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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;
+ }
+ }
+
+ 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_);
+ }
+ 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_);
+ }
+ 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.GetKeyRequest)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.GetKeyRequest other =
+ (com.google.recaptchaenterprise.v1beta1.GetKeyRequest) obj;
+
+ if (!getName().equals(other.getName())) 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 = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.GetKeyRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.GetKeyRequest 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.GetKeyRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.GetKeyRequest 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.GetKeyRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.GetKeyRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.GetKeyRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.GetKeyRequest 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.GetKeyRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.GetKeyRequest 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.GetKeyRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.GetKeyRequest 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.GetKeyRequest 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 get key request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.GetKeyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the requested key, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 name of the requested key, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 name of the requested key, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the requested key, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the requested key, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = 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.GetKeyRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.GetKeyRequest)
+ private static final com.google.recaptchaenterprise.v1beta1.GetKeyRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.GetKeyRequest();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.GetKeyRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The name of the requested key, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * Required. The name of the requested key, in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ com.google.protobuf.ByteString getNameBytes();
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/IOSKeySettings.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/IOSKeySettings.java
new file mode 100644
index 00000000..492f0909
--- /dev/null
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/IOSKeySettings.java
@@ -0,0 +1,710 @@
+/*
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * Settings specific to keys that can be used by iOS apps. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings} + */ +public final class IOSKeySettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings) + IOSKeySettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use IOSKeySettings.newBuilder() to construct. + private IOSKeySettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private IOSKeySettings() { + allowedBundleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IOSKeySettings( + 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(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowedBundleIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + allowedBundleIds_.add(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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + allowedBundleIds_ = allowedBundleIds_.getUnmodifiableView(); + } + 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_IOSKeySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_IOSKeySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.IOSKeySettings.class, + com.google.recaptchaenterprise.v1beta1.IOSKeySettings.Builder.class); + } + + public static final int ALLOWED_BUNDLE_IDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList allowedBundleIds_; + /** + * + * + *
+ * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getAllowedBundleIdsList() {
+ return allowedBundleIds_;
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public int getAllowedBundleIdsCount() {
+ return allowedBundleIds_.size();
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public java.lang.String getAllowedBundleIds(int index) {
+ return allowedBundleIds_.get(index);
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public com.google.protobuf.ByteString getAllowedBundleIdsBytes(int index) {
+ return allowedBundleIds_.getByteString(index);
+ }
+
+ 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 {
+ for (int i = 0; i < allowedBundleIds_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allowedBundleIds_.getRaw(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < allowedBundleIds_.size(); i++) {
+ dataSize += computeStringSizeNoTag(allowedBundleIds_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getAllowedBundleIdsList().size();
+ }
+ 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.IOSKeySettings)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings other =
+ (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) obj;
+
+ if (!getAllowedBundleIdsList().equals(other.getAllowedBundleIdsList())) 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();
+ if (getAllowedBundleIdsCount() > 0) {
+ hash = (37 * hash) + ALLOWED_BUNDLE_IDS_FIELD_NUMBER;
+ hash = (53 * hash) + getAllowedBundleIdsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.IOSKeySettings parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.IOSKeySettings 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.IOSKeySettings parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.IOSKeySettings 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.IOSKeySettings parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.IOSKeySettings parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.IOSKeySettings parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.IOSKeySettings 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.IOSKeySettings parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.IOSKeySettings 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.IOSKeySettings parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.IOSKeySettings 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.IOSKeySettings 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;
+ }
+ /**
+ *
+ *
+ * + * Settings specific to keys that can be used by iOS apps. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getAllowedBundleIdsList() {
+ return allowedBundleIds_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public int getAllowedBundleIdsCount() {
+ return allowedBundleIds_.size();
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public java.lang.String getAllowedBundleIds(int index) {
+ return allowedBundleIds_.get(index);
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public com.google.protobuf.ByteString getAllowedBundleIdsBytes(int index) {
+ return allowedBundleIds_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public Builder setAllowedBundleIds(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAllowedBundleIdsIsMutable();
+ allowedBundleIds_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public Builder addAllowedBundleIds(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAllowedBundleIdsIsMutable();
+ allowedBundleIds_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public Builder addAllAllowedBundleIds(java.lang.Iterable+ * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public Builder clearAllowedBundleIds() {
+ allowedBundleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ public Builder addAllowedBundleIdsBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureAllowedBundleIdsIsMutable();
+ allowedBundleIds_.add(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.IOSKeySettings)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings)
+ private static final com.google.recaptchaenterprise.v1beta1.IOSKeySettings DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.IOSKeySettings();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.IOSKeySettings getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ java.util.List+ * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ int getAllowedBundleIdsCount();
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ java.lang.String getAllowedBundleIds(int index);
+ /**
+ *
+ *
+ * + * iOS bundle ids of apps allowed to use the key. + * Example: 'com.companyname.productname.appname' + *+ * + *
repeated string allowed_bundle_ids = 1;
+ */
+ com.google.protobuf.ByteString getAllowedBundleIdsBytes(int index);
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Key.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Key.java
new file mode 100644
index 00000000..1aaafbfe
--- /dev/null
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/Key.java
@@ -0,0 +1,1760 @@
+/*
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * A key used to identify and configure applications (web and/or mobile) that + * use reCAPTCHA Enterprise. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.Key} + */ +public final class Key extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.Key) + KeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Key.newBuilder() to construct. + private Key(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Key() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Key( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + com.google.recaptchaenterprise.v1beta1.WebKeySettings.Builder subBuilder = null; + if (platformSettingsCase_ == 3) { + subBuilder = + ((com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_) + .toBuilder(); + } + platformSettings_ = + input.readMessage( + com.google.recaptchaenterprise.v1beta1.WebKeySettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_); + platformSettings_ = subBuilder.buildPartial(); + } + platformSettingsCase_ = 3; + break; + } + case 34: + { + com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.Builder subBuilder = null; + if (platformSettingsCase_ == 4) { + subBuilder = + ((com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_) + .toBuilder(); + } + platformSettings_ = + input.readMessage( + com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_); + platformSettings_ = subBuilder.buildPartial(); + } + platformSettingsCase_ = 4; + break; + } + case 42: + { + com.google.recaptchaenterprise.v1beta1.IOSKeySettings.Builder subBuilder = null; + if (platformSettingsCase_ == 5) { + subBuilder = + ((com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_) + .toBuilder(); + } + platformSettings_ = + input.readMessage( + com.google.recaptchaenterprise.v1beta1.IOSKeySettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_); + platformSettings_ = subBuilder.buildPartial(); + } + platformSettingsCase_ = 5; + 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_Key_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_Key_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.Key.class, + com.google.recaptchaenterprise.v1beta1.Key.Builder.class); + } + + private int platformSettingsCase_ = 0; + private java.lang.Object platformSettings_; + + public enum PlatformSettingsCase implements com.google.protobuf.Internal.EnumLite { + WEB_SETTINGS(3), + ANDROID_SETTINGS(4), + IOS_SETTINGS(5), + PLATFORMSETTINGS_NOT_SET(0); + private final int value; + + private PlatformSettingsCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static PlatformSettingsCase valueOf(int value) { + return forNumber(value); + } + + public static PlatformSettingsCase forNumber(int value) { + switch (value) { + case 3: + return WEB_SETTINGS; + case 4: + return ANDROID_SETTINGS; + case 5: + return IOS_SETTINGS; + case 0: + return PLATFORMSETTINGS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PlatformSettingsCase getPlatformSettingsCase() { + return PlatformSettingsCase.forNumber(platformSettingsCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * The resource name for the Key in the format + * "projects/{project_number}/keys/{key_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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Key in the format + * "projects/{project_number}/keys/{key_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 DISPLAY_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object displayName_;
+ /**
+ *
+ *
+ * + * Human-readable display name of this key. Modifiable by user. + *+ * + *
string display_name = 2;
+ */
+ public java.lang.String getDisplayName() {
+ java.lang.Object ref = displayName_;
+ 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();
+ displayName_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Human-readable display name of this key. Modifiable by user. + *+ * + *
string display_name = 2;
+ */
+ public com.google.protobuf.ByteString getDisplayNameBytes() {
+ java.lang.Object ref = displayName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ displayName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int WEB_SETTINGS_FIELD_NUMBER = 3;
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public boolean hasWebSettings() {
+ return platformSettingsCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public com.google.recaptchaenterprise.v1beta1.WebKeySettings getWebSettings() {
+ if (platformSettingsCase_ == 3) {
+ return (com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.WebKeySettings.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public com.google.recaptchaenterprise.v1beta1.WebKeySettingsOrBuilder getWebSettingsOrBuilder() {
+ if (platformSettingsCase_ == 3) {
+ return (com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.WebKeySettings.getDefaultInstance();
+ }
+
+ public static final int ANDROID_SETTINGS_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ */
+ public boolean hasAndroidSettings() {
+ return platformSettingsCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ */
+ public com.google.recaptchaenterprise.v1beta1.AndroidKeySettings getAndroidSettings() {
+ if (platformSettingsCase_ == 4) {
+ return (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ */
+ public com.google.recaptchaenterprise.v1beta1.AndroidKeySettingsOrBuilder
+ getAndroidSettingsOrBuilder() {
+ if (platformSettingsCase_ == 4) {
+ return (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.getDefaultInstance();
+ }
+
+ public static final int IOS_SETTINGS_FIELD_NUMBER = 5;
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public boolean hasIosSettings() {
+ return platformSettingsCase_ == 5;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public com.google.recaptchaenterprise.v1beta1.IOSKeySettings getIosSettings() {
+ if (platformSettingsCase_ == 5) {
+ return (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.IOSKeySettings.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public com.google.recaptchaenterprise.v1beta1.IOSKeySettingsOrBuilder getIosSettingsOrBuilder() {
+ if (platformSettingsCase_ == 5) {
+ return (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.IOSKeySettings.getDefaultInstance();
+ }
+
+ 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 (!getDisplayNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
+ }
+ if (platformSettingsCase_ == 3) {
+ output.writeMessage(
+ 3, (com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_);
+ }
+ if (platformSettingsCase_ == 4) {
+ output.writeMessage(
+ 4, (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_);
+ }
+ if (platformSettingsCase_ == 5) {
+ output.writeMessage(
+ 5, (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_);
+ }
+ 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 (!getDisplayNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
+ }
+ if (platformSettingsCase_ == 3) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, (com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_);
+ }
+ if (platformSettingsCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4, (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_);
+ }
+ if (platformSettingsCase_ == 5) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 5, (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_);
+ }
+ 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.Key)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.Key other =
+ (com.google.recaptchaenterprise.v1beta1.Key) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getDisplayName().equals(other.getDisplayName())) return false;
+ if (!getPlatformSettingsCase().equals(other.getPlatformSettingsCase())) return false;
+ switch (platformSettingsCase_) {
+ case 3:
+ if (!getWebSettings().equals(other.getWebSettings())) return false;
+ break;
+ case 4:
+ if (!getAndroidSettings().equals(other.getAndroidSettings())) return false;
+ break;
+ case 5:
+ if (!getIosSettings().equals(other.getIosSettings())) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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) + DISPLAY_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getDisplayName().hashCode();
+ switch (platformSettingsCase_) {
+ case 3:
+ hash = (37 * hash) + WEB_SETTINGS_FIELD_NUMBER;
+ hash = (53 * hash) + getWebSettings().hashCode();
+ break;
+ case 4:
+ hash = (37 * hash) + ANDROID_SETTINGS_FIELD_NUMBER;
+ hash = (53 * hash) + getAndroidSettings().hashCode();
+ break;
+ case 5:
+ hash = (37 * hash) + IOS_SETTINGS_FIELD_NUMBER;
+ hash = (53 * hash) + getIosSettings().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Key parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Key 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.Key parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Key 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.Key parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Key parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Key parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Key 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.Key parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Key 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.Key parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Key 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.Key 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 key used to identify and configure applications (web and/or mobile) that + * use reCAPTCHA Enterprise. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.Key} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The resource name for the Key in the format + * "projects/{project_number}/keys/{key_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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Key in the format + * "projects/{project_number}/keys/{key_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;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Key in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Key in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Key in the format + * "projects/{project_number}/keys/{key_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 java.lang.Object displayName_ = "";
+ /**
+ *
+ *
+ * + * Human-readable display name of this key. Modifiable by user. + *+ * + *
string display_name = 2;
+ */
+ public java.lang.String getDisplayName() {
+ java.lang.Object ref = displayName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ displayName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Human-readable display name of this key. Modifiable by user. + *+ * + *
string display_name = 2;
+ */
+ public com.google.protobuf.ByteString getDisplayNameBytes() {
+ java.lang.Object ref = displayName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ displayName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Human-readable display name of this key. Modifiable by user. + *+ * + *
string display_name = 2;
+ */
+ public Builder setDisplayName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ displayName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Human-readable display name of this key. Modifiable by user. + *+ * + *
string display_name = 2;
+ */
+ public Builder clearDisplayName() {
+
+ displayName_ = getDefaultInstance().getDisplayName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Human-readable display name of this key. Modifiable by user. + *+ * + *
string display_name = 2;
+ */
+ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ displayName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings,
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.Builder,
+ com.google.recaptchaenterprise.v1beta1.WebKeySettingsOrBuilder>
+ webSettingsBuilder_;
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public boolean hasWebSettings() {
+ return platformSettingsCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public com.google.recaptchaenterprise.v1beta1.WebKeySettings getWebSettings() {
+ if (webSettingsBuilder_ == null) {
+ if (platformSettingsCase_ == 3) {
+ return (com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.WebKeySettings.getDefaultInstance();
+ } else {
+ if (platformSettingsCase_ == 3) {
+ return webSettingsBuilder_.getMessage();
+ }
+ return com.google.recaptchaenterprise.v1beta1.WebKeySettings.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public Builder setWebSettings(com.google.recaptchaenterprise.v1beta1.WebKeySettings value) {
+ if (webSettingsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ platformSettings_ = value;
+ onChanged();
+ } else {
+ webSettingsBuilder_.setMessage(value);
+ }
+ platformSettingsCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public Builder setWebSettings(
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.Builder builderForValue) {
+ if (webSettingsBuilder_ == null) {
+ platformSettings_ = builderForValue.build();
+ onChanged();
+ } else {
+ webSettingsBuilder_.setMessage(builderForValue.build());
+ }
+ platformSettingsCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public Builder mergeWebSettings(com.google.recaptchaenterprise.v1beta1.WebKeySettings value) {
+ if (webSettingsBuilder_ == null) {
+ if (platformSettingsCase_ == 3
+ && platformSettings_
+ != com.google.recaptchaenterprise.v1beta1.WebKeySettings.getDefaultInstance()) {
+ platformSettings_ =
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.newBuilder(
+ (com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ platformSettings_ = value;
+ }
+ onChanged();
+ } else {
+ if (platformSettingsCase_ == 3) {
+ webSettingsBuilder_.mergeFrom(value);
+ }
+ webSettingsBuilder_.setMessage(value);
+ }
+ platformSettingsCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public Builder clearWebSettings() {
+ if (webSettingsBuilder_ == null) {
+ if (platformSettingsCase_ == 3) {
+ platformSettingsCase_ = 0;
+ platformSettings_ = null;
+ onChanged();
+ }
+ } else {
+ if (platformSettingsCase_ == 3) {
+ platformSettingsCase_ = 0;
+ platformSettings_ = null;
+ }
+ webSettingsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public com.google.recaptchaenterprise.v1beta1.WebKeySettings.Builder getWebSettingsBuilder() {
+ return getWebSettingsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ public com.google.recaptchaenterprise.v1beta1.WebKeySettingsOrBuilder
+ getWebSettingsOrBuilder() {
+ if ((platformSettingsCase_ == 3) && (webSettingsBuilder_ != null)) {
+ return webSettingsBuilder_.getMessageOrBuilder();
+ } else {
+ if (platformSettingsCase_ == 3) {
+ return (com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.WebKeySettings.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings,
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.Builder,
+ com.google.recaptchaenterprise.v1beta1.WebKeySettingsOrBuilder>
+ getWebSettingsFieldBuilder() {
+ if (webSettingsBuilder_ == null) {
+ if (!(platformSettingsCase_ == 3)) {
+ platformSettings_ =
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.getDefaultInstance();
+ }
+ webSettingsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings,
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.Builder,
+ com.google.recaptchaenterprise.v1beta1.WebKeySettingsOrBuilder>(
+ (com.google.recaptchaenterprise.v1beta1.WebKeySettings) platformSettings_,
+ getParentForChildren(),
+ isClean());
+ platformSettings_ = null;
+ }
+ platformSettingsCase_ = 3;
+ onChanged();
+ ;
+ return webSettingsBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings,
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.Builder,
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettingsOrBuilder>
+ androidSettingsBuilder_;
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ *
+ */
+ public boolean hasAndroidSettings() {
+ return platformSettingsCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.AndroidKeySettings getAndroidSettings() {
+ if (androidSettingsBuilder_ == null) {
+ if (platformSettingsCase_ == 4) {
+ return (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.getDefaultInstance();
+ } else {
+ if (platformSettingsCase_ == 4) {
+ return androidSettingsBuilder_.getMessage();
+ }
+ return com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ *
+ */
+ public Builder setAndroidSettings(
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings value) {
+ if (androidSettingsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ platformSettings_ = value;
+ onChanged();
+ } else {
+ androidSettingsBuilder_.setMessage(value);
+ }
+ platformSettingsCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ *
+ */
+ public Builder setAndroidSettings(
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.Builder builderForValue) {
+ if (androidSettingsBuilder_ == null) {
+ platformSettings_ = builderForValue.build();
+ onChanged();
+ } else {
+ androidSettingsBuilder_.setMessage(builderForValue.build());
+ }
+ platformSettingsCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ *
+ */
+ public Builder mergeAndroidSettings(
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings value) {
+ if (androidSettingsBuilder_ == null) {
+ if (platformSettingsCase_ == 4
+ && platformSettings_
+ != com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.getDefaultInstance()) {
+ platformSettings_ =
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.newBuilder(
+ (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ platformSettings_ = value;
+ }
+ onChanged();
+ } else {
+ if (platformSettingsCase_ == 4) {
+ androidSettingsBuilder_.mergeFrom(value);
+ }
+ androidSettingsBuilder_.setMessage(value);
+ }
+ platformSettingsCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ *
+ */
+ public Builder clearAndroidSettings() {
+ if (androidSettingsBuilder_ == null) {
+ if (platformSettingsCase_ == 4) {
+ platformSettingsCase_ = 0;
+ platformSettings_ = null;
+ onChanged();
+ }
+ } else {
+ if (platformSettingsCase_ == 4) {
+ platformSettingsCase_ = 0;
+ platformSettings_ = null;
+ }
+ androidSettingsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.Builder
+ getAndroidSettingsBuilder() {
+ return getAndroidSettingsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.AndroidKeySettingsOrBuilder
+ getAndroidSettingsOrBuilder() {
+ if ((platformSettingsCase_ == 4) && (androidSettingsBuilder_ != null)) {
+ return androidSettingsBuilder_.getMessageOrBuilder();
+ } else {
+ if (platformSettingsCase_ == 4) {
+ return (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings,
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.Builder,
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettingsOrBuilder>
+ getAndroidSettingsFieldBuilder() {
+ if (androidSettingsBuilder_ == null) {
+ if (!(platformSettingsCase_ == 4)) {
+ platformSettings_ =
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.getDefaultInstance();
+ }
+ androidSettingsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings,
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings.Builder,
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettingsOrBuilder>(
+ (com.google.recaptchaenterprise.v1beta1.AndroidKeySettings) platformSettings_,
+ getParentForChildren(),
+ isClean());
+ platformSettings_ = null;
+ }
+ platformSettingsCase_ = 4;
+ onChanged();
+ ;
+ return androidSettingsBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings,
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings.Builder,
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettingsOrBuilder>
+ iosSettingsBuilder_;
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public boolean hasIosSettings() {
+ return platformSettingsCase_ == 5;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public com.google.recaptchaenterprise.v1beta1.IOSKeySettings getIosSettings() {
+ if (iosSettingsBuilder_ == null) {
+ if (platformSettingsCase_ == 5) {
+ return (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.IOSKeySettings.getDefaultInstance();
+ } else {
+ if (platformSettingsCase_ == 5) {
+ return iosSettingsBuilder_.getMessage();
+ }
+ return com.google.recaptchaenterprise.v1beta1.IOSKeySettings.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public Builder setIosSettings(com.google.recaptchaenterprise.v1beta1.IOSKeySettings value) {
+ if (iosSettingsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ platformSettings_ = value;
+ onChanged();
+ } else {
+ iosSettingsBuilder_.setMessage(value);
+ }
+ platformSettingsCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public Builder setIosSettings(
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings.Builder builderForValue) {
+ if (iosSettingsBuilder_ == null) {
+ platformSettings_ = builderForValue.build();
+ onChanged();
+ } else {
+ iosSettingsBuilder_.setMessage(builderForValue.build());
+ }
+ platformSettingsCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public Builder mergeIosSettings(com.google.recaptchaenterprise.v1beta1.IOSKeySettings value) {
+ if (iosSettingsBuilder_ == null) {
+ if (platformSettingsCase_ == 5
+ && platformSettings_
+ != com.google.recaptchaenterprise.v1beta1.IOSKeySettings.getDefaultInstance()) {
+ platformSettings_ =
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings.newBuilder(
+ (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ platformSettings_ = value;
+ }
+ onChanged();
+ } else {
+ if (platformSettingsCase_ == 5) {
+ iosSettingsBuilder_.mergeFrom(value);
+ }
+ iosSettingsBuilder_.setMessage(value);
+ }
+ platformSettingsCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public Builder clearIosSettings() {
+ if (iosSettingsBuilder_ == null) {
+ if (platformSettingsCase_ == 5) {
+ platformSettingsCase_ = 0;
+ platformSettings_ = null;
+ onChanged();
+ }
+ } else {
+ if (platformSettingsCase_ == 5) {
+ platformSettingsCase_ = 0;
+ platformSettings_ = null;
+ }
+ iosSettingsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public com.google.recaptchaenterprise.v1beta1.IOSKeySettings.Builder getIosSettingsBuilder() {
+ return getIosSettingsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ public com.google.recaptchaenterprise.v1beta1.IOSKeySettingsOrBuilder
+ getIosSettingsOrBuilder() {
+ if ((platformSettingsCase_ == 5) && (iosSettingsBuilder_ != null)) {
+ return iosSettingsBuilder_.getMessageOrBuilder();
+ } else {
+ if (platformSettingsCase_ == 5) {
+ return (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_;
+ }
+ return com.google.recaptchaenterprise.v1beta1.IOSKeySettings.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings,
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings.Builder,
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettingsOrBuilder>
+ getIosSettingsFieldBuilder() {
+ if (iosSettingsBuilder_ == null) {
+ if (!(platformSettingsCase_ == 5)) {
+ platformSettings_ =
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings.getDefaultInstance();
+ }
+ iosSettingsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings,
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings.Builder,
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettingsOrBuilder>(
+ (com.google.recaptchaenterprise.v1beta1.IOSKeySettings) platformSettings_,
+ getParentForChildren(),
+ isClean());
+ platformSettings_ = null;
+ }
+ platformSettingsCase_ = 5;
+ onChanged();
+ ;
+ return iosSettingsBuilder_;
+ }
+
+ @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.Key)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.Key)
+ private static final com.google.recaptchaenterprise.v1beta1.Key DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.Key();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.Key getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The resource name for the Key in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The resource name for the Key in the format + * "projects/{project_number}/keys/{key_id}". + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * Human-readable display name of this key. Modifiable by user. + *+ * + *
string display_name = 2;
+ */
+ java.lang.String getDisplayName();
+ /**
+ *
+ *
+ * + * Human-readable display name of this key. Modifiable by user. + *+ * + *
string display_name = 2;
+ */
+ com.google.protobuf.ByteString getDisplayNameBytes();
+
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ boolean hasWebSettings();
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings getWebSettings();
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by websites. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings web_settings = 3;
+ */
+ com.google.recaptchaenterprise.v1beta1.WebKeySettingsOrBuilder getWebSettingsOrBuilder();
+
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ */
+ boolean hasAndroidSettings();
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ */
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettings getAndroidSettings();
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by Android apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings android_settings = 4;
+ */
+ com.google.recaptchaenterprise.v1beta1.AndroidKeySettingsOrBuilder getAndroidSettingsOrBuilder();
+
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ boolean hasIosSettings();
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettings getIosSettings();
+ /**
+ *
+ *
+ * + * Settings for keys that can be used by iOS apps. + *+ * + *
.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings ios_settings = 5;
+ */
+ com.google.recaptchaenterprise.v1beta1.IOSKeySettingsOrBuilder getIosSettingsOrBuilder();
+
+ public com.google.recaptchaenterprise.v1beta1.Key.PlatformSettingsCase getPlatformSettingsCase();
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/ListKeysRequest.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/ListKeysRequest.java
new file mode 100644
index 00000000..51378a23
--- /dev/null
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/ListKeysRequest.java
@@ -0,0 +1,886 @@
+/*
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * The list keys request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.ListKeysRequest} + */ +public final class ListKeysRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.ListKeysRequest) + ListKeysRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListKeysRequest.newBuilder() to construct. + private ListKeysRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ListKeysRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListKeysRequest( + 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 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = 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_ListKeysRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.ListKeysRequest.class, + com.google.recaptchaenterprise.v1beta1.ListKeysRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+ * Required. The name of the project that contains the keys that will be + * listed, in the format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 that contains the keys that will be + * listed, in the format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 PAGE_SIZE_FIELD_NUMBER = 2;
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The maximum number of keys to return. Default is 10. Max limit is + * 1000. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 3;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ * + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ 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();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = 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 (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(2, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
+ }
+ 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 (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
+ }
+ 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.ListKeysRequest)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.ListKeysRequest other =
+ (com.google.recaptchaenterprise.v1beta1.ListKeysRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) 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();
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysRequest 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.ListKeysRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysRequest 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.ListKeysRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysRequest 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.ListKeysRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysRequest 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.ListKeysRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysRequest 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.ListKeysRequest 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 list keys request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.ListKeysRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the project that contains the keys that will be + * listed, in the format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 that contains the keys that will be + * listed, in the format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ 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 that contains the keys that will be + * listed, in the format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the project that contains the keys that will be + * listed, in the format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The name of the project that contains the keys that will be + * listed, in the format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The maximum number of keys to return. Default is 10. Max limit is + * 1000. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+ /**
+ *
+ *
+ * + * Optional. The maximum number of keys to return. Default is 10. Max limit is + * 1000. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The maximum number of keys to return. Default is 10. Max limit is + * 1000. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ * + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = 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.ListKeysRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.ListKeysRequest)
+ private static final com.google.recaptchaenterprise.v1beta1.ListKeysRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.ListKeysRequest();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The name of the project that contains the keys that will be + * listed, in the format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Required. The name of the project that contains the keys that will be + * listed, in the format "projects/{project_number}". + *+ * + *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The maximum number of keys to return. Default is 10. Max limit is + * 1000. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ * + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ * + * Optional. The next_page_token value returned from a previous. + * ListKeysRequest, if any. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/ListKeysResponse.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/ListKeysResponse.java
new file mode 100644
index 00000000..fb0504d7
--- /dev/null
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/ListKeysResponse.java
@@ -0,0 +1,1109 @@
+/*
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * Response to request to list keys in a project. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.ListKeysResponse} + */ +public final class ListKeysResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.ListKeysResponse) + ListKeysResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListKeysResponse.newBuilder() to construct. + private ListKeysResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ListKeysResponse() { + keys_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListKeysResponse( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + keys_ = new java.util.ArrayList
+ * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public java.util.List+ * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public java.util.List extends com.google.recaptchaenterprise.v1beta1.KeyOrBuilder>
+ getKeysOrBuilderList() {
+ return keys_;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public int getKeysCount() {
+ return keys_.size();
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key getKeys(int index) {
+ return keys_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public com.google.recaptchaenterprise.v1beta1.KeyOrBuilder getKeysOrBuilder(int index) {
+ return keys_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + *+ * + *
string next_page_token = 2;
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ 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();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + *+ * + *
string next_page_token = 2;
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = 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 {
+ for (int i = 0; i < keys_.size(); i++) {
+ output.writeMessage(1, keys_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < keys_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, keys_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
+ }
+ 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.ListKeysResponse)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.ListKeysResponse other =
+ (com.google.recaptchaenterprise.v1beta1.ListKeysResponse) obj;
+
+ if (!getKeysList().equals(other.getKeysList())) return false;
+ if (!getNextPageToken().equals(other.getNextPageToken())) 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();
+ if (getKeysCount() > 0) {
+ hash = (37 * hash) + KEYS_FIELD_NUMBER;
+ hash = (53 * hash) + getKeysList().hashCode();
+ }
+ hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNextPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysResponse 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.ListKeysResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysResponse 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.ListKeysResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysResponse 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.ListKeysResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysResponse 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.ListKeysResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysResponse 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.ListKeysResponse 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;
+ }
+ /**
+ *
+ *
+ * + * Response to request to list keys in a project. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.ListKeysResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public java.util.List+ * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public int getKeysCount() {
+ if (keysBuilder_ == null) {
+ return keys_.size();
+ } else {
+ return keysBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key getKeys(int index) {
+ if (keysBuilder_ == null) {
+ return keys_.get(index);
+ } else {
+ return keysBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public Builder setKeys(int index, com.google.recaptchaenterprise.v1beta1.Key value) {
+ if (keysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureKeysIsMutable();
+ keys_.set(index, value);
+ onChanged();
+ } else {
+ keysBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public Builder setKeys(
+ int index, com.google.recaptchaenterprise.v1beta1.Key.Builder builderForValue) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ keys_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ keysBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public Builder addKeys(com.google.recaptchaenterprise.v1beta1.Key value) {
+ if (keysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureKeysIsMutable();
+ keys_.add(value);
+ onChanged();
+ } else {
+ keysBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public Builder addKeys(int index, com.google.recaptchaenterprise.v1beta1.Key value) {
+ if (keysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureKeysIsMutable();
+ keys_.add(index, value);
+ onChanged();
+ } else {
+ keysBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public Builder addKeys(com.google.recaptchaenterprise.v1beta1.Key.Builder builderForValue) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ keys_.add(builderForValue.build());
+ onChanged();
+ } else {
+ keysBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public Builder addKeys(
+ int index, com.google.recaptchaenterprise.v1beta1.Key.Builder builderForValue) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ keys_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ keysBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public Builder addAllKeys(
+ java.lang.Iterable extends com.google.recaptchaenterprise.v1beta1.Key> values) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, keys_);
+ onChanged();
+ } else {
+ keysBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public Builder clearKeys() {
+ if (keysBuilder_ == null) {
+ keys_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ keysBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public Builder removeKeys(int index) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ keys_.remove(index);
+ onChanged();
+ } else {
+ keysBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key.Builder getKeysBuilder(int index) {
+ return getKeysFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public com.google.recaptchaenterprise.v1beta1.KeyOrBuilder getKeysOrBuilder(int index) {
+ if (keysBuilder_ == null) {
+ return keys_.get(index);
+ } else {
+ return keysBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public java.util.List extends com.google.recaptchaenterprise.v1beta1.KeyOrBuilder>
+ getKeysOrBuilderList() {
+ if (keysBuilder_ != null) {
+ return keysBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(keys_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key.Builder addKeysBuilder() {
+ return getKeysFieldBuilder()
+ .addBuilder(com.google.recaptchaenterprise.v1beta1.Key.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key.Builder addKeysBuilder(int index) {
+ return getKeysFieldBuilder()
+ .addBuilder(index, com.google.recaptchaenterprise.v1beta1.Key.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ public java.util.List+ * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + *+ * + *
string next_page_token = 2;
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + *+ * + *
string next_page_token = 2;
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + *+ * + *
string next_page_token = 2;
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + *+ * + *
string next_page_token = 2;
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + *+ * + *
string next_page_token = 2;
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = 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.ListKeysResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.ListKeysResponse)
+ private static final com.google.recaptchaenterprise.v1beta1.ListKeysResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.ListKeysResponse();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.ListKeysResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ java.util.List+ * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ com.google.recaptchaenterprise.v1beta1.Key getKeys(int index);
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ int getKeysCount();
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ java.util.List extends com.google.recaptchaenterprise.v1beta1.KeyOrBuilder>
+ getKeysOrBuilderList();
+ /**
+ *
+ *
+ * + * Key details. + *+ * + *
repeated .google.cloud.recaptchaenterprise.v1beta1.Key keys = 1;
+ */
+ com.google.recaptchaenterprise.v1beta1.KeyOrBuilder getKeysOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + *+ * + *
string next_page_token = 2;
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ *
+ * + * Token to retrieve the next page of results. It is set to empty if no keys + * remain in results. + *+ * + *
string next_page_token = 2;
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/RecaptchaEnterpriseProto.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/RecaptchaEnterpriseProto.java
index a7c6f85d..883dd2c8 100644
--- a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/RecaptchaEnterpriseProto.java
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/RecaptchaEnterpriseProto.java
@@ -51,6 +51,46 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_recaptchaenterprise_v1beta1_TokenProperties_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_recaptchaenterprise_v1beta1_TokenProperties_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_CreateKeyRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_CreateKeyRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_GetKeyRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_GetKeyRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_UpdateKeyRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_UpdateKeyRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_DeleteKeyRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_DeleteKeyRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_Key_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_Key_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_WebKeySettings_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_WebKeySettings_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_AndroidKeySettings_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_AndroidKeySettings_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_IOSKeySettings_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_IOSKeySettings_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
@@ -65,67 +105,136 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ud.recaptchaenterprise.v1beta1\032\034google/a"
+ "pi/annotations.proto\032\027google/api/client."
+ "proto\032\037google/api/field_behavior.proto\032\031"
- + "google/api/resource.proto\032\037google/protob"
- + "uf/timestamp.proto\"\255\001\n\027CreateAssessmentR"
- + "equest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudres"
- + "ourcemanager.googleapis.com/Project\022M\n\na"
- + "ssessment\030\002 \001(\01324.google.cloud.recaptcha"
- + "enterprise.v1beta1.AssessmentB\003\340A\002\"\223\002\n\031A"
- + "nnotateAssessmentRequest\022C\n\004name\030\001 \001(\tB5"
- + "\340A\002\372A/\n-recaptchaenterprise.googleapis.c"
- + "om/Assessment\022g\n\nannotation\030\002 \001(\0162N.goog"
- + "le.cloud.recaptchaenterprise.v1beta1.Ann"
- + "otateAssessmentRequest.AnnotationB\003\340A\002\"H"
- + "\n\nAnnotation\022\032\n\026ANNOTATION_UNSPECIFIED\020\000"
- + "\022\016\n\nLEGITIMATE\020\001\022\016\n\nFRAUDULENT\020\002\"\034\n\032Anno"
- + "tateAssessmentResponse\"\312\004\n\nAssessment\022\021\n"
- + "\004name\030\001 \001(\tB\003\340A\003\022>\n\005event\030\002 \001(\0132/.google"
- + ".cloud.recaptchaenterprise.v1beta1.Event"
- + "\022\022\n\005score\030\003 \001(\002B\003\340A\003\022X\n\020token_properties"
- + "\030\004 \001(\01329.google.cloud.recaptchaenterpris"
- + "e.v1beta1.TokenPropertiesB\003\340A\003\022_\n\007reason"
- + "s\030\005 \003(\0162I.google.cloud.recaptchaenterpri"
- + "se.v1beta1.Assessment.ClassificationReas"
- + "onB\003\340A\003\"\270\001\n\024ClassificationReason\022%\n!CLAS"
- + "SIFICATION_REASON_UNSPECIFIED\020\000\022\016\n\nAUTOM"
- + "ATION\020\001\022\032\n\026UNEXPECTED_ENVIRONMENT\020\002\022\024\n\020T"
- + "OO_MUCH_TRAFFIC\020\003\022\035\n\031UNEXPECTED_USAGE_PA"
- + "TTERNS\020\004\022\030\n\024LOW_CONFIDENCE_SCORE\020\005:_\352A\\\n"
- + "-recaptchaenterprise.googleapis.com/Asse"
- + "ssment\022+projects/{project}/assessments/{"
- + "assessment}\"2\n\005Event\022\022\n\005token\030\001 \001(\tB\003\340A\002"
- + "\022\025\n\010site_key\030\002 \001(\tB\003\340A\002\"\350\002\n\017TokenPropert"
- + "ies\022\r\n\005valid\030\001 \001(\010\022_\n\016invalid_reason\030\002 \001"
- + "(\0162G.google.cloud.recaptchaenterprise.v1"
- + "beta1.TokenProperties.InvalidReason\022/\n\013c"
- + "reate_time\030\003 \001(\0132\032.google.protobuf.Times"
- + "tamp\022\020\n\010hostname\030\004 \001(\t\022\016\n\006action\030\005 \001(\t\"\221"
- + "\001\n\rInvalidReason\022\036\n\032INVALID_REASON_UNSPE"
- + "CIFIED\020\000\022\032\n\026UNKNOWN_INVALID_REASON\020\001\022\r\n\t"
- + "MALFORMED\020\002\022\013\n\007EXPIRED\020\003\022\010\n\004DUPE\020\004\022\021\n\rSI"
- + "TE_MISMATCH\020\005\022\013\n\007MISSING\020\0062\315\004\n!Recaptcha"
- + "EnterpriseServiceV1Beta1\022\335\001\n\020CreateAsses"
- + "sment\022A.google.cloud.recaptchaenterprise"
- + ".v1beta1.CreateAssessmentRequest\0324.googl"
- + "e.cloud.recaptchaenterprise.v1beta1.Asse"
- + "ssment\"P\202\323\344\223\0026\"(/v1beta1/{parent=project"
- + "s/*}/assessments:\nassessment\332A\021parent,as"
- + "sessment\022\357\001\n\022AnnotateAssessment\022C.google"
- + ".cloud.recaptchaenterprise.v1beta1.Annot"
- + "ateAssessmentRequest\032D.google.cloud.reca"
- + "ptchaenterprise.v1beta1.AnnotateAssessme"
- + "ntResponse\"N\202\323\344\223\0026\"1/v1beta1/{name=proje"
- + "cts/*/assessments/*}:annotate:\001*\332A\017name,"
- + "annotation\032V\312A\"recaptchaenterprise.googl"
- + "eapis.com\322A.https://www.googleapis.com/a"
- + "uth/cloud-platformB\376\001\n&com.google.recapt"
- + "chaenterprise.v1beta1B\030RecaptchaEnterpri"
- + "seProtoP\001Z[google.golang.org/genproto/go"
- + "ogleapis/cloud/recaptchaenterprise/v1bet"
- + "a1;recaptchaenterprise\242\002\004GCRE\252\002(Google.C"
- + "loud.RecaptchaEnterprise.V1Beta1\312\002(Googl"
- + "e\\Cloud\\RecaptchaEnterprise\\V1beta1b\006pro"
- + "to3"
+ + "google/api/resource.proto\032\033google/protob"
+ + "uf/empty.proto\032 google/protobuf/field_ma"
+ + "sk.proto\032\037google/protobuf/timestamp.prot"
+ + "o\"\255\001\n\027CreateAssessmentRequest\022C\n\006parent\030"
+ + "\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goog"
+ + "leapis.com/Project\022M\n\nassessment\030\002 \001(\01324"
+ + ".google.cloud.recaptchaenterprise.v1beta"
+ + "1.AssessmentB\003\340A\002\"\223\002\n\031AnnotateAssessment"
+ + "Request\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-recaptcha"
+ + "enterprise.googleapis.com/Assessment\022g\n\n"
+ + "annotation\030\002 \001(\0162N.google.cloud.recaptch"
+ + "aenterprise.v1beta1.AnnotateAssessmentRe"
+ + "quest.AnnotationB\003\340A\002\"H\n\nAnnotation\022\032\n\026A"
+ + "NNOTATION_UNSPECIFIED\020\000\022\016\n\nLEGITIMATE\020\001\022"
+ + "\016\n\nFRAUDULENT\020\002\"\034\n\032AnnotateAssessmentRes"
+ + "ponse\"\312\004\n\nAssessment\022\021\n\004name\030\001 \001(\tB\003\340A\003\022"
+ + ">\n\005event\030\002 \001(\0132/.google.cloud.recaptchae"
+ + "nterprise.v1beta1.Event\022\022\n\005score\030\003 \001(\002B\003"
+ + "\340A\003\022X\n\020token_properties\030\004 \001(\01329.google.c"
+ + "loud.recaptchaenterprise.v1beta1.TokenPr"
+ + "opertiesB\003\340A\003\022_\n\007reasons\030\005 \003(\0162I.google."
+ + "cloud.recaptchaenterprise.v1beta1.Assess"
+ + "ment.ClassificationReasonB\003\340A\003\"\270\001\n\024Class"
+ + "ificationReason\022%\n!CLASSIFICATION_REASON"
+ + "_UNSPECIFIED\020\000\022\016\n\nAUTOMATION\020\001\022\032\n\026UNEXPE"
+ + "CTED_ENVIRONMENT\020\002\022\024\n\020TOO_MUCH_TRAFFIC\020\003"
+ + "\022\035\n\031UNEXPECTED_USAGE_PATTERNS\020\004\022\030\n\024LOW_C"
+ + "ONFIDENCE_SCORE\020\005:_\352A\\\n-recaptchaenterpr"
+ + "ise.googleapis.com/Assessment\022+projects/"
+ + "{project}/assessments/{assessment}\"\207\001\n\005E"
+ + "vent\022\022\n\005token\030\001 \001(\tB\003\340A\001\022\025\n\010site_key\030\002 \001"
+ + "(\tB\003\340A\001\022\027\n\nuser_agent\030\003 \001(\tB\003\340A\001\022\034\n\017user"
+ + "_ip_address\030\004 \001(\tB\003\340A\001\022\034\n\017expected_actio"
+ + "n\030\005 \001(\tB\003\340A\001\"\350\002\n\017TokenProperties\022\r\n\005vali"
+ + "d\030\001 \001(\010\022_\n\016invalid_reason\030\002 \001(\0162G.google"
+ + ".cloud.recaptchaenterprise.v1beta1.Token"
+ + "Properties.InvalidReason\022/\n\013create_time\030"
+ + "\003 \001(\0132\032.google.protobuf.Timestamp\022\020\n\010hos"
+ + "tname\030\004 \001(\t\022\016\n\006action\030\005 \001(\t\"\221\001\n\rInvalidR"
+ + "eason\022\036\n\032INVALID_REASON_UNSPECIFIED\020\000\022\032\n"
+ + "\026UNKNOWN_INVALID_REASON\020\001\022\r\n\tMALFORMED\020\002"
+ + "\022\013\n\007EXPIRED\020\003\022\010\n\004DUPE\020\004\022\021\n\rSITE_MISMATCH"
+ + "\020\005\022\013\n\007MISSING\020\006\"\230\001\n\020CreateKeyRequest\022C\n\006"
+ + "parent\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanag"
+ + "er.googleapis.com/Project\022?\n\003key\030\002 \001(\0132-"
+ + ".google.cloud.recaptchaenterprise.v1beta"
+ + "1.KeyB\003\340A\002\"\207\001\n\017ListKeysRequest\022C\n\006parent"
+ + "\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goo"
+ + "gleapis.com/Project\022\026\n\tpage_size\030\002 \001(\005B\003"
+ + "\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"h\n\020ListKeys"
+ + "Response\022;\n\004keys\030\001 \003(\0132-.google.cloud.re"
+ + "captchaenterprise.v1beta1.Key\022\027\n\017next_pa"
+ + "ge_token\030\002 \001(\t\"M\n\rGetKeyRequest\022<\n\004name\030"
+ + "\001 \001(\tB.\340A\002\372A(\n&recaptchaenterprise.googl"
+ + "eapis.com/Key\"\264\001\n\020UpdateKeyRequest\022j\n\003ke"
+ + "y\030\001 \001(\0132-.google.cloud.recaptchaenterpri"
+ + "se.v1beta1.KeyB.\340A\002\372A(\n&recaptchaenterpr"
+ + "ise.googleapis.com/Key\0224\n\013update_mask\030\002 "
+ + "\001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"P\n\020"
+ + "DeleteKeyRequest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&"
+ + "recaptchaenterprise.googleapis.com/Key\"\210"
+ + "\003\n\003Key\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001"
+ + "(\t\022P\n\014web_settings\030\003 \001(\01328.google.cloud."
+ + "recaptchaenterprise.v1beta1.WebKeySettin"
+ + "gsH\000\022X\n\020android_settings\030\004 \001(\0132<.google."
+ + "cloud.recaptchaenterprise.v1beta1.Androi"
+ + "dKeySettingsH\000\022P\n\014ios_settings\030\005 \001(\01328.g"
+ + "oogle.cloud.recaptchaenterprise.v1beta1."
+ + "IOSKeySettingsH\000:J\352AG\n&recaptchaenterpri"
+ + "se.googleapis.com/Key\022\035projects/{project"
+ + "}/keys/{key}B\023\n\021platform_settings\"\272\004\n\016We"
+ + "bKeySettings\022\037\n\027enforce_allowed_domains\030"
+ + "\003 \001(\010\022\027\n\017allowed_domains\030\001 \003(\t\022\031\n\021allow_"
+ + "amp_traffic\030\002 \001(\010\022g\n\020integration_type\030\004 "
+ + "\001(\0162H.google.cloud.recaptchaenterprise.v"
+ + "1beta1.WebKeySettings.IntegrationTypeB\003\340"
+ + "A\002\022{\n\035challenge_security_preference\030\005 \001("
+ + "\0162T.google.cloud.recaptchaenterprise.v1b"
+ + "eta1.WebKeySettings.ChallengeSecurityPre"
+ + "ference\"t\n\017IntegrationType\022 \n\034INTEGRATIO"
+ + "N_TYPE_UNSPECIFIED\020\000\022\016\n\nSCORE_ONLY\020\001\022\026\n\022"
+ + "CHECKBOX_CHALLENGE\020\002\022\027\n\023INVISIBLE_CHALLE"
+ + "NGE\020\003\"w\n\033ChallengeSecurityPreference\022-\n)"
+ + "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIE"
+ + "D\020\000\022\r\n\tUSABILITY\020\001\022\014\n\010BALANCED\020\002\022\014\n\010SECU"
+ + "RITY\020\003\"3\n\022AndroidKeySettings\022\035\n\025allowed_"
+ + "package_names\030\001 \003(\t\",\n\016IOSKeySettings\022\032\n"
+ + "\022allowed_bundle_ids\030\001 \003(\t2\375\n\n!RecaptchaE"
+ + "nterpriseServiceV1Beta1\022\335\001\n\020CreateAssess"
+ + "ment\022A.google.cloud.recaptchaenterprise."
+ + "v1beta1.CreateAssessmentRequest\0324.google"
+ + ".cloud.recaptchaenterprise.v1beta1.Asses"
+ + "sment\"P\202\323\344\223\0026\"(/v1beta1/{parent=projects"
+ + "/*}/assessments:\nassessment\332A\021parent,ass"
+ + "essment\022\357\001\n\022AnnotateAssessment\022C.google."
+ + "cloud.recaptchaenterprise.v1beta1.Annota"
+ + "teAssessmentRequest\032D.google.cloud.recap"
+ + "tchaenterprise.v1beta1.AnnotateAssessmen"
+ + "tResponse\"N\202\323\344\223\0026\"1/v1beta1/{name=projec"
+ + "ts/*/assessments/*}:annotate:\001*\332A\017name,a"
+ + "nnotation\022\246\001\n\tCreateKey\022:.google.cloud.r"
+ + "ecaptchaenterprise.v1beta1.CreateKeyRequ"
+ + "est\032-.google.cloud.recaptchaenterprise.v"
+ + "1beta1.Key\".\202\323\344\223\002(\"!/v1beta1/{parent=pro"
+ + "jects/*}/keys:\003key\022\254\001\n\010ListKeys\0229.google"
+ + ".cloud.recaptchaenterprise.v1beta1.ListK"
+ + "eysRequest\032:.google.cloud.recaptchaenter"
+ + "prise.v1beta1.ListKeysResponse\")\202\323\344\223\002#\022!"
+ + "/v1beta1/{parent=projects/*}/keys\022\233\001\n\006Ge"
+ + "tKey\0227.google.cloud.recaptchaenterprise."
+ + "v1beta1.GetKeyRequest\032-.google.cloud.rec"
+ + "aptchaenterprise.v1beta1.Key\")\202\323\344\223\002#\022!/v"
+ + "1beta1/{name=projects/*/keys/*}\022\252\001\n\tUpda"
+ + "teKey\022:.google.cloud.recaptchaenterprise"
+ + ".v1beta1.UpdateKeyRequest\032-.google.cloud"
+ + ".recaptchaenterprise.v1beta1.Key\"2\202\323\344\223\002,"
+ + "2%/v1beta1/{key.name=projects/*/keys/*}:"
+ + "\003key\022\212\001\n\tDeleteKey\022:.google.cloud.recapt"
+ + "chaenterprise.v1beta1.DeleteKeyRequest\032\026"
+ + ".google.protobuf.Empty\")\202\323\344\223\002#*!/v1beta1"
+ + "/{name=projects/*/keys/*}\032V\312A\"recaptchae"
+ + "nterprise.googleapis.com\322A.https://www.g"
+ + "oogleapis.com/auth/cloud-platformB\376\001\n&co"
+ + "m.google.recaptchaenterprise.v1beta1B\030Re"
+ + "captchaEnterpriseProtoP\001Z[google.golang."
+ + "org/genproto/googleapis/cloud/recaptchae"
+ + "nterprise/v1beta1;recaptchaenterprise\242\002\004"
+ + "GCRE\252\002(Google.Cloud.RecaptchaEnterprise."
+ + "V1Beta1\312\002(Google\\Cloud\\RecaptchaEnterpri"
+ + "se\\V1beta1b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -142,6 +251,8 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.api.ClientProto.getDescriptor(),
com.google.api.FieldBehaviorProto.getDescriptor(),
com.google.api.ResourceProto.getDescriptor(),
+ com.google.protobuf.EmptyProto.getDescriptor(),
+ com.google.protobuf.FieldMaskProto.getDescriptor(),
com.google.protobuf.TimestampProto.getDescriptor(),
},
assigner);
@@ -181,7 +292,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_recaptchaenterprise_v1beta1_Event_descriptor,
new java.lang.String[] {
- "Token", "SiteKey",
+ "Token", "SiteKey", "UserAgent", "UserIpAddress", "ExpectedAction",
});
internal_static_google_cloud_recaptchaenterprise_v1beta1_TokenProperties_descriptor =
getDescriptor().getMessageTypes().get(5);
@@ -191,6 +302,95 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
new java.lang.String[] {
"Valid", "InvalidReason", "CreateTime", "Hostname", "Action",
});
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_CreateKeyRequest_descriptor =
+ getDescriptor().getMessageTypes().get(6);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_CreateKeyRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_CreateKeyRequest_descriptor,
+ new java.lang.String[] {
+ "Parent", "Key",
+ });
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysRequest_descriptor =
+ getDescriptor().getMessageTypes().get(7);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysRequest_descriptor,
+ new java.lang.String[] {
+ "Parent", "PageSize", "PageToken",
+ });
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysResponse_descriptor =
+ getDescriptor().getMessageTypes().get(8);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_ListKeysResponse_descriptor,
+ new java.lang.String[] {
+ "Keys", "NextPageToken",
+ });
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_GetKeyRequest_descriptor =
+ getDescriptor().getMessageTypes().get(9);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_GetKeyRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_GetKeyRequest_descriptor,
+ new java.lang.String[] {
+ "Name",
+ });
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_UpdateKeyRequest_descriptor =
+ getDescriptor().getMessageTypes().get(10);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_UpdateKeyRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_UpdateKeyRequest_descriptor,
+ new java.lang.String[] {
+ "Key", "UpdateMask",
+ });
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_DeleteKeyRequest_descriptor =
+ getDescriptor().getMessageTypes().get(11);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_DeleteKeyRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_DeleteKeyRequest_descriptor,
+ new java.lang.String[] {
+ "Name",
+ });
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_Key_descriptor =
+ getDescriptor().getMessageTypes().get(12);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_Key_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_Key_descriptor,
+ new java.lang.String[] {
+ "Name",
+ "DisplayName",
+ "WebSettings",
+ "AndroidSettings",
+ "IosSettings",
+ "PlatformSettings",
+ });
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_WebKeySettings_descriptor =
+ getDescriptor().getMessageTypes().get(13);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_WebKeySettings_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_WebKeySettings_descriptor,
+ new java.lang.String[] {
+ "EnforceAllowedDomains",
+ "AllowedDomains",
+ "AllowAmpTraffic",
+ "IntegrationType",
+ "ChallengeSecurityPreference",
+ });
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_AndroidKeySettings_descriptor =
+ getDescriptor().getMessageTypes().get(14);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_AndroidKeySettings_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_AndroidKeySettings_descriptor,
+ new java.lang.String[] {
+ "AllowedPackageNames",
+ });
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_IOSKeySettings_descriptor =
+ getDescriptor().getMessageTypes().get(15);
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_IOSKeySettings_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_recaptchaenterprise_v1beta1_IOSKeySettings_descriptor,
+ new java.lang.String[] {
+ "AllowedBundleIds",
+ });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.ClientProto.defaultHost);
@@ -206,6 +406,8 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.api.ClientProto.getDescriptor();
com.google.api.FieldBehaviorProto.getDescriptor();
com.google.api.ResourceProto.getDescriptor();
+ com.google.protobuf.EmptyProto.getDescriptor();
+ com.google.protobuf.FieldMaskProto.getDescriptor();
com.google.protobuf.TimestampProto.getDescriptor();
}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/UpdateKeyRequest.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/UpdateKeyRequest.java
new file mode 100644
index 00000000..59ef61b4
--- /dev/null
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/UpdateKeyRequest.java
@@ -0,0 +1,1025 @@
+/*
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * The update key request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.UpdateKeyRequest} + */ +public final class UpdateKeyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.UpdateKeyRequest) + UpdateKeyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateKeyRequest.newBuilder() to construct. + private UpdateKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private UpdateKeyRequest() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateKeyRequest( + 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: + { + com.google.recaptchaenterprise.v1beta1.Key.Builder subBuilder = null; + if (key_ != null) { + subBuilder = key_.toBuilder(); + } + key_ = + input.readMessage( + com.google.recaptchaenterprise.v1beta1.Key.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(key_); + key_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = 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_UpdateKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_UpdateKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest.class, + com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private com.google.recaptchaenterprise.v1beta1.Key key_; + /** + * + * + *
+ * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public boolean hasKey() {
+ return key_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key getKey() {
+ return key_ == null ? com.google.recaptchaenterprise.v1beta1.Key.getDefaultInstance() : key_;
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.KeyOrBuilder getKeyOrBuilder() {
+ return getKey();
+ }
+
+ public static final int UPDATE_MASK_FIELD_NUMBER = 2;
+ private com.google.protobuf.FieldMask updateMask_;
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public boolean hasUpdateMask() {
+ return updateMask_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.protobuf.FieldMask getUpdateMask() {
+ return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_;
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
+ return getUpdateMask();
+ }
+
+ 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 (key_ != null) {
+ output.writeMessage(1, getKey());
+ }
+ if (updateMask_ != null) {
+ output.writeMessage(2, getUpdateMask());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (key_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKey());
+ }
+ if (updateMask_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask());
+ }
+ 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.UpdateKeyRequest)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest other =
+ (com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest) obj;
+
+ if (hasKey() != other.hasKey()) return false;
+ if (hasKey()) {
+ if (!getKey().equals(other.getKey())) return false;
+ }
+ if (hasUpdateMask() != other.hasUpdateMask()) return false;
+ if (hasUpdateMask()) {
+ if (!getUpdateMask().equals(other.getUpdateMask())) 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();
+ if (hasKey()) {
+ hash = (37 * hash) + KEY_FIELD_NUMBER;
+ hash = (53 * hash) + getKey().hashCode();
+ }
+ if (hasUpdateMask()) {
+ hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER;
+ hash = (53 * hash) + getUpdateMask().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest 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.UpdateKeyRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest 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.UpdateKeyRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest 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.UpdateKeyRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest 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.UpdateKeyRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest 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.UpdateKeyRequest 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 update key request message. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.UpdateKeyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public boolean hasKey() {
+ return keyBuilder_ != null || key_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key getKey() {
+ if (keyBuilder_ == null) {
+ return key_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Key.getDefaultInstance()
+ : key_;
+ } else {
+ return keyBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder setKey(com.google.recaptchaenterprise.v1beta1.Key value) {
+ if (keyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ key_ = value;
+ onChanged();
+ } else {
+ keyBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder setKey(com.google.recaptchaenterprise.v1beta1.Key.Builder builderForValue) {
+ if (keyBuilder_ == null) {
+ key_ = builderForValue.build();
+ onChanged();
+ } else {
+ keyBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder mergeKey(com.google.recaptchaenterprise.v1beta1.Key value) {
+ if (keyBuilder_ == null) {
+ if (key_ != null) {
+ key_ =
+ com.google.recaptchaenterprise.v1beta1.Key.newBuilder(key_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ key_ = value;
+ }
+ onChanged();
+ } else {
+ keyBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public Builder clearKey() {
+ if (keyBuilder_ == null) {
+ key_ = null;
+ onChanged();
+ } else {
+ key_ = null;
+ keyBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.Key.Builder getKeyBuilder() {
+
+ onChanged();
+ return getKeyFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.KeyOrBuilder getKeyOrBuilder() {
+ if (keyBuilder_ != null) {
+ return keyBuilder_.getMessageOrBuilder();
+ } else {
+ return key_ == null
+ ? com.google.recaptchaenterprise.v1beta1.Key.getDefaultInstance()
+ : key_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Key,
+ com.google.recaptchaenterprise.v1beta1.Key.Builder,
+ com.google.recaptchaenterprise.v1beta1.KeyOrBuilder>
+ getKeyFieldBuilder() {
+ if (keyBuilder_ == null) {
+ keyBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.recaptchaenterprise.v1beta1.Key,
+ com.google.recaptchaenterprise.v1beta1.Key.Builder,
+ com.google.recaptchaenterprise.v1beta1.KeyOrBuilder>(
+ getKey(), getParentForChildren(), isClean());
+ key_ = null;
+ }
+ return keyBuilder_;
+ }
+
+ private com.google.protobuf.FieldMask updateMask_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.FieldMask,
+ com.google.protobuf.FieldMask.Builder,
+ com.google.protobuf.FieldMaskOrBuilder>
+ updateMaskBuilder_;
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public boolean hasUpdateMask() {
+ return updateMaskBuilder_ != null || updateMask_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.protobuf.FieldMask getUpdateMask() {
+ if (updateMaskBuilder_ == null) {
+ return updateMask_ == null
+ ? com.google.protobuf.FieldMask.getDefaultInstance()
+ : updateMask_;
+ } else {
+ return updateMaskBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setUpdateMask(com.google.protobuf.FieldMask value) {
+ if (updateMaskBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ updateMask_ = value;
+ onChanged();
+ } else {
+ updateMaskBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) {
+ if (updateMaskBuilder_ == null) {
+ updateMask_ = builderForValue.build();
+ onChanged();
+ } else {
+ updateMaskBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) {
+ if (updateMaskBuilder_ == null) {
+ if (updateMask_ != null) {
+ updateMask_ =
+ com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial();
+ } else {
+ updateMask_ = value;
+ }
+ onChanged();
+ } else {
+ updateMaskBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearUpdateMask() {
+ if (updateMaskBuilder_ == null) {
+ updateMask_ = null;
+ onChanged();
+ } else {
+ updateMask_ = null;
+ updateMaskBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() {
+
+ onChanged();
+ return getUpdateMaskFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
+ if (updateMaskBuilder_ != null) {
+ return updateMaskBuilder_.getMessageOrBuilder();
+ } else {
+ return updateMask_ == null
+ ? com.google.protobuf.FieldMask.getDefaultInstance()
+ : updateMask_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.FieldMask,
+ com.google.protobuf.FieldMask.Builder,
+ com.google.protobuf.FieldMaskOrBuilder>
+ getUpdateMaskFieldBuilder() {
+ if (updateMaskBuilder_ == null) {
+ updateMaskBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.FieldMask,
+ com.google.protobuf.FieldMask.Builder,
+ com.google.protobuf.FieldMaskOrBuilder>(
+ getUpdateMask(), getParentForChildren(), isClean());
+ updateMask_ = null;
+ }
+ return updateMaskBuilder_;
+ }
+
+ @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.UpdateKeyRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.UpdateKeyRequest)
+ private static final com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.UpdateKeyRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ boolean hasKey();
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ com.google.recaptchaenterprise.v1beta1.Key getKey();
+ /**
+ *
+ *
+ * + * Required. The key to update. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.Key key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ */
+ com.google.recaptchaenterprise.v1beta1.KeyOrBuilder getKeyOrBuilder();
+
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ boolean hasUpdateMask();
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.protobuf.FieldMask getUpdateMask();
+ /**
+ *
+ *
+ * + * Optional. The mask to control which field of the key get updated. If the mask is not + * present, all fields will be updated. + *+ * + *
.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder();
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/WebKeySettings.java b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/WebKeySettings.java
new file mode 100644
index 00000000..38d14d87
--- /dev/null
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/WebKeySettings.java
@@ -0,0 +1,1585 @@
+/*
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+
+package com.google.recaptchaenterprise.v1beta1;
+
+/**
+ *
+ *
+ * + * Settings specific to keys that can be used by websites. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.WebKeySettings} + */ +public final class WebKeySettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.WebKeySettings) + WebKeySettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebKeySettings.newBuilder() to construct. + private WebKeySettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private WebKeySettings() { + allowedDomains_ = com.google.protobuf.LazyStringArrayList.EMPTY; + integrationType_ = 0; + challengeSecurityPreference_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WebKeySettings( + 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(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + allowedDomains_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + allowedDomains_.add(s); + break; + } + case 16: + { + allowAmpTraffic_ = input.readBool(); + break; + } + case 24: + { + enforceAllowedDomains_ = input.readBool(); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + integrationType_ = rawValue; + break; + } + case 40: + { + int rawValue = input.readEnum(); + + challengeSecurityPreference_ = 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 { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + allowedDomains_ = allowedDomains_.getUnmodifiableView(); + } + 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_WebKeySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto + .internal_static_google_cloud_recaptchaenterprise_v1beta1_WebKeySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.recaptchaenterprise.v1beta1.WebKeySettings.class, + com.google.recaptchaenterprise.v1beta1.WebKeySettings.Builder.class); + } + + /** + * + * + *
+ * Enum that represents the integration types for web keys. + *+ * + * Protobuf enum {@code google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType} + */ + public enum IntegrationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Default type that indicates this enum hasn't been specified. This is not + * a valid IntegrationType, one of the other types must be specified + * instead. + *+ * + *
INTEGRATION_TYPE_UNSPECIFIED = 0;
+ */
+ INTEGRATION_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Only used to produce scores. It doesn't display the "I'm not a robot" + * checkbox and never shows captcha challenges. + *+ * + *
SCORE_ONLY = 1;
+ */
+ SCORE_ONLY(1),
+ /**
+ *
+ *
+ * + * Displays the "I'm not a robot" checkbox and may show captcha challenges + * after it is checked. + *+ * + *
CHECKBOX_CHALLENGE = 2;
+ */
+ CHECKBOX_CHALLENGE(2),
+ /**
+ *
+ *
+ * + * Doesn't display the "I'm not a robot" checkbox, but may show captcha + * challenges after risk analysis. + *+ * + *
INVISIBLE_CHALLENGE = 3;
+ */
+ INVISIBLE_CHALLENGE(3),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Default type that indicates this enum hasn't been specified. This is not + * a valid IntegrationType, one of the other types must be specified + * instead. + *+ * + *
INTEGRATION_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int INTEGRATION_TYPE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Only used to produce scores. It doesn't display the "I'm not a robot" + * checkbox and never shows captcha challenges. + *+ * + *
SCORE_ONLY = 1;
+ */
+ public static final int SCORE_ONLY_VALUE = 1;
+ /**
+ *
+ *
+ * + * Displays the "I'm not a robot" checkbox and may show captcha challenges + * after it is checked. + *+ * + *
CHECKBOX_CHALLENGE = 2;
+ */
+ public static final int CHECKBOX_CHALLENGE_VALUE = 2;
+ /**
+ *
+ *
+ * + * Doesn't display the "I'm not a robot" checkbox, but may show captcha + * challenges after risk analysis. + *+ * + *
INVISIBLE_CHALLENGE = 3;
+ */
+ public static final int INVISIBLE_CHALLENGE_VALUE = 3;
+
+ 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 IntegrationType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static IntegrationType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return INTEGRATION_TYPE_UNSPECIFIED;
+ case 1:
+ return SCORE_ONLY;
+ case 2:
+ return CHECKBOX_CHALLENGE;
+ case 3:
+ return INVISIBLE_CHALLENGE;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Enum that represents the possible challenge frequency and difficulty + * configurations for a web key. + *+ * + * Protobuf enum {@code + * google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference} + */ + public enum ChallengeSecurityPreference implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Default type that indicates this enum hasn't been specified. + *+ * + *
CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0;
+ */
+ CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Key tends to show fewer and easier challenges. + *+ * + *
USABILITY = 1;
+ */
+ USABILITY(1),
+ /**
+ *
+ *
+ * + * Key tends to show balanced (in amount and difficulty) challenges. + *+ * + *
BALANCED = 2;
+ */
+ BALANCED(2),
+ /**
+ *
+ *
+ * + * Key tends to show more and harder challenges. + *+ * + *
SECURITY = 3;
+ */
+ SECURITY(3),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Default type that indicates this enum hasn't been specified. + *+ * + *
CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0;
+ */
+ public static final int CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Key tends to show fewer and easier challenges. + *+ * + *
USABILITY = 1;
+ */
+ public static final int USABILITY_VALUE = 1;
+ /**
+ *
+ *
+ * + * Key tends to show balanced (in amount and difficulty) challenges. + *+ * + *
BALANCED = 2;
+ */
+ public static final int BALANCED_VALUE = 2;
+ /**
+ *
+ *
+ * + * Key tends to show more and harder challenges. + *+ * + *
SECURITY = 3;
+ */
+ public static final int SECURITY_VALUE = 3;
+
+ 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 ChallengeSecurityPreference valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static ChallengeSecurityPreference forNumber(int value) {
+ switch (value) {
+ case 0:
+ return CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED;
+ case 1:
+ return USABILITY;
+ case 2:
+ return BALANCED;
+ case 3:
+ return SECURITY;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Whether allowed_domains is enforced or not. + *+ * + *
bool enforce_allowed_domains = 3;
+ */
+ public boolean getEnforceAllowedDomains() {
+ return enforceAllowedDomains_;
+ }
+
+ public static final int ALLOWED_DOMAINS_FIELD_NUMBER = 1;
+ private com.google.protobuf.LazyStringList allowedDomains_;
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getAllowedDomainsList() {
+ return allowedDomains_;
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public int getAllowedDomainsCount() {
+ return allowedDomains_.size();
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public java.lang.String getAllowedDomains(int index) {
+ return allowedDomains_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public com.google.protobuf.ByteString getAllowedDomainsBytes(int index) {
+ return allowedDomains_.getByteString(index);
+ }
+
+ public static final int ALLOW_AMP_TRAFFIC_FIELD_NUMBER = 2;
+ private boolean allowAmpTraffic_;
+ /**
+ *
+ *
+ * + * Whether this key can be used on AMP (Accelerated Mobile Pages) websites. + *+ * + *
bool allow_amp_traffic = 2;
+ */
+ public boolean getAllowAmpTraffic() {
+ return allowAmpTraffic_;
+ }
+
+ public static final int INTEGRATION_TYPE_FIELD_NUMBER = 4;
+ private int integrationType_;
+ /**
+ *
+ *
+ * + * Required. Describes how this key is integrated with the website. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public int getIntegrationTypeValue() {
+ return integrationType_;
+ }
+ /**
+ *
+ *
+ * + * Required. Describes how this key is integrated with the website. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType
+ getIntegrationType() {
+ @SuppressWarnings("deprecation")
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType result =
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType.valueOf(
+ integrationType_);
+ return result == null
+ ? com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int CHALLENGE_SECURITY_PREFERENCE_FIELD_NUMBER = 5;
+ private int challengeSecurityPreference_;
+ /**
+ *
+ *
+ * + * Settings for the frequency and difficulty at which this key triggers + * captcha challenges. This should only be specified for IntegrationTypes + * CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5;
+ *
+ */
+ public int getChallengeSecurityPreferenceValue() {
+ return challengeSecurityPreference_;
+ }
+ /**
+ *
+ *
+ * + * Settings for the frequency and difficulty at which this key triggers + * captcha challenges. This should only be specified for IntegrationTypes + * CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference
+ getChallengeSecurityPreference() {
+ @SuppressWarnings("deprecation")
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference result =
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference.valueOf(
+ challengeSecurityPreference_);
+ return result == null
+ ? com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference
+ .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 {
+ for (int i = 0; i < allowedDomains_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allowedDomains_.getRaw(i));
+ }
+ if (allowAmpTraffic_ != false) {
+ output.writeBool(2, allowAmpTraffic_);
+ }
+ if (enforceAllowedDomains_ != false) {
+ output.writeBool(3, enforceAllowedDomains_);
+ }
+ if (integrationType_
+ != com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType
+ .INTEGRATION_TYPE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(4, integrationType_);
+ }
+ if (challengeSecurityPreference_
+ != com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference
+ .CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(5, challengeSecurityPreference_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < allowedDomains_.size(); i++) {
+ dataSize += computeStringSizeNoTag(allowedDomains_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getAllowedDomainsList().size();
+ }
+ if (allowAmpTraffic_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowAmpTraffic_);
+ }
+ if (enforceAllowedDomains_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enforceAllowedDomains_);
+ }
+ if (integrationType_
+ != com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType
+ .INTEGRATION_TYPE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, integrationType_);
+ }
+ if (challengeSecurityPreference_
+ != com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference
+ .CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED
+ .getNumber()) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeEnumSize(5, challengeSecurityPreference_);
+ }
+ 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.WebKeySettings)) {
+ return super.equals(obj);
+ }
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings other =
+ (com.google.recaptchaenterprise.v1beta1.WebKeySettings) obj;
+
+ if (getEnforceAllowedDomains() != other.getEnforceAllowedDomains()) return false;
+ if (!getAllowedDomainsList().equals(other.getAllowedDomainsList())) return false;
+ if (getAllowAmpTraffic() != other.getAllowAmpTraffic()) return false;
+ if (integrationType_ != other.integrationType_) return false;
+ if (challengeSecurityPreference_ != other.challengeSecurityPreference_) 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) + ENFORCE_ALLOWED_DOMAINS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnforceAllowedDomains());
+ if (getAllowedDomainsCount() > 0) {
+ hash = (37 * hash) + ALLOWED_DOMAINS_FIELD_NUMBER;
+ hash = (53 * hash) + getAllowedDomainsList().hashCode();
+ }
+ hash = (37 * hash) + ALLOW_AMP_TRAFFIC_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowAmpTraffic());
+ hash = (37 * hash) + INTEGRATION_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + integrationType_;
+ hash = (37 * hash) + CHALLENGE_SECURITY_PREFERENCE_FIELD_NUMBER;
+ hash = (53 * hash) + challengeSecurityPreference_;
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.WebKeySettings parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.WebKeySettings 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.WebKeySettings parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.WebKeySettings 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.WebKeySettings parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.WebKeySettings parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.WebKeySettings parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.WebKeySettings 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.WebKeySettings parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.WebKeySettings 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.WebKeySettings parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.WebKeySettings 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.WebKeySettings 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;
+ }
+ /**
+ *
+ *
+ * + * Settings specific to keys that can be used by websites. + *+ * + * Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.WebKeySettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Whether allowed_domains is enforced or not. + *+ * + *
bool enforce_allowed_domains = 3;
+ */
+ public boolean getEnforceAllowedDomains() {
+ return enforceAllowedDomains_;
+ }
+ /**
+ *
+ *
+ * + * Whether allowed_domains is enforced or not. + *+ * + *
bool enforce_allowed_domains = 3;
+ */
+ public Builder setEnforceAllowedDomains(boolean value) {
+
+ enforceAllowedDomains_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Whether allowed_domains is enforced or not. + *+ * + *
bool enforce_allowed_domains = 3;
+ */
+ public Builder clearEnforceAllowedDomains() {
+
+ enforceAllowedDomains_ = false;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList allowedDomains_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureAllowedDomainsIsMutable() {
+ if (!((bitField0_ & 0x00000002) != 0)) {
+ allowedDomains_ = new com.google.protobuf.LazyStringArrayList(allowedDomains_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public com.google.protobuf.ProtocolStringList getAllowedDomainsList() {
+ return allowedDomains_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public int getAllowedDomainsCount() {
+ return allowedDomains_.size();
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public java.lang.String getAllowedDomains(int index) {
+ return allowedDomains_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public com.google.protobuf.ByteString getAllowedDomainsBytes(int index) {
+ return allowedDomains_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public Builder setAllowedDomains(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAllowedDomainsIsMutable();
+ allowedDomains_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public Builder addAllowedDomains(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAllowedDomainsIsMutable();
+ allowedDomains_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public Builder addAllAllowedDomains(java.lang.Iterable+ * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public Builder clearAllowedDomains() {
+ allowedDomains_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ public Builder addAllowedDomainsBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureAllowedDomainsIsMutable();
+ allowedDomains_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private boolean allowAmpTraffic_;
+ /**
+ *
+ *
+ * + * Whether this key can be used on AMP (Accelerated Mobile Pages) websites. + *+ * + *
bool allow_amp_traffic = 2;
+ */
+ public boolean getAllowAmpTraffic() {
+ return allowAmpTraffic_;
+ }
+ /**
+ *
+ *
+ * + * Whether this key can be used on AMP (Accelerated Mobile Pages) websites. + *+ * + *
bool allow_amp_traffic = 2;
+ */
+ public Builder setAllowAmpTraffic(boolean value) {
+
+ allowAmpTraffic_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Whether this key can be used on AMP (Accelerated Mobile Pages) websites. + *+ * + *
bool allow_amp_traffic = 2;
+ */
+ public Builder clearAllowAmpTraffic() {
+
+ allowAmpTraffic_ = false;
+ onChanged();
+ return this;
+ }
+
+ private int integrationType_ = 0;
+ /**
+ *
+ *
+ * + * Required. Describes how this key is integrated with the website. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public int getIntegrationTypeValue() {
+ return integrationType_;
+ }
+ /**
+ *
+ *
+ * + * Required. Describes how this key is integrated with the website. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setIntegrationTypeValue(int value) {
+ integrationType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Describes how this key is integrated with the website. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType
+ getIntegrationType() {
+ @SuppressWarnings("deprecation")
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType result =
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType.valueOf(
+ integrationType_);
+ return result == null
+ ? com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * Required. Describes how this key is integrated with the website. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setIntegrationType(
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ integrationType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Describes how this key is integrated with the website. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearIntegrationType() {
+
+ integrationType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int challengeSecurityPreference_ = 0;
+ /**
+ *
+ *
+ * + * Settings for the frequency and difficulty at which this key triggers + * captcha challenges. This should only be specified for IntegrationTypes + * CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5;
+ *
+ */
+ public int getChallengeSecurityPreferenceValue() {
+ return challengeSecurityPreference_;
+ }
+ /**
+ *
+ *
+ * + * Settings for the frequency and difficulty at which this key triggers + * captcha challenges. This should only be specified for IntegrationTypes + * CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5;
+ *
+ */
+ public Builder setChallengeSecurityPreferenceValue(int value) {
+ challengeSecurityPreference_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for the frequency and difficulty at which this key triggers + * captcha challenges. This should only be specified for IntegrationTypes + * CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5;
+ *
+ */
+ public com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference
+ getChallengeSecurityPreference() {
+ @SuppressWarnings("deprecation")
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference result =
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference.valueOf(
+ challengeSecurityPreference_);
+ return result == null
+ ? com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference
+ .UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * Settings for the frequency and difficulty at which this key triggers + * captcha challenges. This should only be specified for IntegrationTypes + * CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5;
+ *
+ */
+ public Builder setChallengeSecurityPreference(
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ challengeSecurityPreference_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Settings for the frequency and difficulty at which this key triggers + * captcha challenges. This should only be specified for IntegrationTypes + * CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5;
+ *
+ */
+ public Builder clearChallengeSecurityPreference() {
+
+ challengeSecurityPreference_ = 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.WebKeySettings)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.WebKeySettings)
+ private static final com.google.recaptchaenterprise.v1beta1.WebKeySettings DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.WebKeySettings();
+ }
+
+ public static com.google.recaptchaenterprise.v1beta1.WebKeySettings getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Whether allowed_domains is enforced or not. + *+ * + *
bool enforce_allowed_domains = 3;
+ */
+ boolean getEnforceAllowedDomains();
+
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ java.util.List+ * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ int getAllowedDomainsCount();
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ java.lang.String getAllowedDomains(int index);
+ /**
+ *
+ *
+ * + * Domains or subdomains of websites allowed to use the key. All subdomains + * of an allowed domain are automatically allowed. A valid domain requires a + * host and must not include any path, port, query or fragment. + * Examples: 'example.com' or 'subdomain.example.com' + *+ * + *
repeated string allowed_domains = 1;
+ */
+ com.google.protobuf.ByteString getAllowedDomainsBytes(int index);
+
+ /**
+ *
+ *
+ * + * Whether this key can be used on AMP (Accelerated Mobile Pages) websites. + *+ * + *
bool allow_amp_traffic = 2;
+ */
+ boolean getAllowAmpTraffic();
+
+ /**
+ *
+ *
+ * + * Required. Describes how this key is integrated with the website. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ int getIntegrationTypeValue();
+ /**
+ *
+ *
+ * + * Required. Describes how this key is integrated with the website. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType getIntegrationType();
+
+ /**
+ *
+ *
+ * + * Settings for the frequency and difficulty at which this key triggers + * captcha challenges. This should only be specified for IntegrationTypes + * CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5;
+ *
+ */
+ int getChallengeSecurityPreferenceValue();
+ /**
+ *
+ *
+ * + * Settings for the frequency and difficulty at which this key triggers + * captcha challenges. This should only be specified for IntegrationTypes + * CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE. + *+ * + *
+ * .google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5;
+ *
+ */
+ com.google.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference
+ getChallengeSecurityPreference();
+}
diff --git a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
index c2025d45..380b42f0 100644
--- a/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
+++ b/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/proto/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
@@ -21,6 +21,8 @@ import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1Beta1";
@@ -54,6 +56,43 @@ service RecaptchaEnterpriseServiceV1Beta1 {
};
option (google.api.method_signature) = "name,annotation";
}
+
+ // Creates a new reCAPTCHA Enterprise key.
+ rpc CreateKey(CreateKeyRequest) returns (Key) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/keys"
+ body: "key"
+ };
+ }
+
+ // Returns the list of all keys that belong to a project.
+ rpc ListKeys(ListKeysRequest) returns (ListKeysResponse) {
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*}/keys"
+ };
+ }
+
+ // Returns the specified key.
+ rpc GetKey(GetKeyRequest) returns (Key) {
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/keys/*}"
+ };
+ }
+
+ // Updates the specified key.
+ rpc UpdateKey(UpdateKeyRequest) returns (Key) {
+ option (google.api.http) = {
+ patch: "/v1beta1/{key.name=projects/*/keys/*}"
+ body: "key"
+ };
+ }
+
+ // Deletes the specified key.
+ rpc DeleteKey(DeleteKeyRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/keys/*}"
+ };
+ }
}
// The create assessment request message.
@@ -154,13 +193,25 @@ message Assessment {
}
message Event {
- // Required. The user response token provided by the reCAPTCHA client-side integration
+ // Optional. The user response token provided by the reCAPTCHA client-side integration
// on your site.
- string token = 1 [(google.api.field_behavior) = REQUIRED];
+ string token = 1 [(google.api.field_behavior) = OPTIONAL];
- // Required. The site key that was used to invoke reCAPTCHA on your site and generate
+ // Optional. The site key that was used to invoke reCAPTCHA on your site and generate
// the token.
- string site_key = 2 [(google.api.field_behavior) = REQUIRED];
+ string site_key = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The user agent present in the request from the user's device related to
+ // this event.
+ string user_agent = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The IP address in the request from the user's device related to this event.
+ string user_ip_address = 4 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The expected action for this type of event. This should be the same action
+ // provided at token generation time on client-side platforms already
+ // integrated with recaptcha enterprise.
+ string expected_action = 5 [(google.api.field_behavior) = OPTIONAL];
}
message TokenProperties {
@@ -207,3 +258,189 @@ message TokenProperties {
// Action name provided at token generation.
string action = 5;
}
+
+// The create key request message.
+message CreateKeyRequest {
+ // Required. The name of the project in which the key will be created, in the
+ // format "projects/{project_number}".
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
+
+ // Required. Information to create a reCAPTCHA Enterprise key.
+ Key key = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The list keys request message.
+message ListKeysRequest {
+ // Required. The name of the project that contains the keys that will be
+ // listed, in the format "projects/{project_number}".
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
+
+ // Optional. The maximum number of keys to return. Default is 10. Max limit is
+ // 1000.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The next_page_token value returned from a previous.
+ // ListKeysRequest, if any.
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response to request to list keys in a project.
+message ListKeysResponse {
+ // Key details.
+ repeated Key keys = 1;
+
+ // Token to retrieve the next page of results. It is set to empty if no keys
+ // remain in results.
+ string next_page_token = 2;
+}
+
+// The get key request message.
+message GetKeyRequest {
+ // Required. The name of the requested key, in the format
+ // "projects/{project_number}/keys/{key_id}".
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Key"
+ }
+ ];
+}
+
+// The update key request message.
+message UpdateKeyRequest {
+ // Required. The key to update.
+ Key key = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Key"
+ }
+ ];
+
+ // Optional. The mask to control which field of the key get updated. If the mask is not
+ // present, all fields will be updated.
+ google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// The delete key request message.
+message DeleteKeyRequest {
+ // Required. The name of the key to be deleted, in the format
+ // "projects/{project_number}/keys/{key_id}".
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Key"
+ }
+ ];
+}
+
+// A key used to identify and configure applications (web and/or mobile) that
+// use reCAPTCHA Enterprise.
+message Key {
+ option (google.api.resource) = {
+ type: "recaptchaenterprise.googleapis.com/Key"
+ pattern: "projects/{project}/keys/{key}"
+ };
+
+ // The resource name for the Key in the format
+ // "projects/{project_number}/keys/{key_id}".
+ string name = 1;
+
+ // Human-readable display name of this key. Modifiable by user.
+ string display_name = 2;
+
+ // Platform specific settings for this key. The key can only be used on one
+ // platform, the one it has settings for.
+ oneof platform_settings {
+ // Settings for keys that can be used by websites.
+ WebKeySettings web_settings = 3;
+
+ // Settings for keys that can be used by Android apps.
+ AndroidKeySettings android_settings = 4;
+
+ // Settings for keys that can be used by iOS apps.
+ IOSKeySettings ios_settings = 5;
+ }
+}
+
+// Settings specific to keys that can be used by websites.
+message WebKeySettings {
+ // Enum that represents the integration types for web keys.
+ enum IntegrationType {
+ // Default type that indicates this enum hasn't been specified. This is not
+ // a valid IntegrationType, one of the other types must be specified
+ // instead.
+ INTEGRATION_TYPE_UNSPECIFIED = 0;
+
+ // Only used to produce scores. It doesn't display the "I'm not a robot"
+ // checkbox and never shows captcha challenges.
+ SCORE_ONLY = 1;
+
+ // Displays the "I'm not a robot" checkbox and may show captcha challenges
+ // after it is checked.
+ CHECKBOX_CHALLENGE = 2;
+
+ // Doesn't display the "I'm not a robot" checkbox, but may show captcha
+ // challenges after risk analysis.
+ INVISIBLE_CHALLENGE = 3;
+ }
+
+ // Enum that represents the possible challenge frequency and difficulty
+ // configurations for a web key.
+ enum ChallengeSecurityPreference {
+ // Default type that indicates this enum hasn't been specified.
+ CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0;
+
+ // Key tends to show fewer and easier challenges.
+ USABILITY = 1;
+
+ // Key tends to show balanced (in amount and difficulty) challenges.
+ BALANCED = 2;
+
+ // Key tends to show more and harder challenges.
+ SECURITY = 3;
+ }
+
+ // Whether allowed_domains is enforced or not.
+ bool enforce_allowed_domains = 3;
+
+ // Domains or subdomains of websites allowed to use the key. All subdomains
+ // of an allowed domain are automatically allowed. A valid domain requires a
+ // host and must not include any path, port, query or fragment.
+ // Examples: 'example.com' or 'subdomain.example.com'
+ repeated string allowed_domains = 1;
+
+ // Whether this key can be used on AMP (Accelerated Mobile Pages) websites.
+ bool allow_amp_traffic = 2;
+
+ // Required. Describes how this key is integrated with the website.
+ IntegrationType integration_type = 4 [(google.api.field_behavior) = REQUIRED];
+
+ // Settings for the frequency and difficulty at which this key triggers
+ // captcha challenges. This should only be specified for IntegrationTypes
+ // CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE.
+ ChallengeSecurityPreference challenge_security_preference = 5;
+}
+
+// Settings specific to keys that can be used by Android apps.
+message AndroidKeySettings {
+ // Android package names of apps allowed to use the key.
+ // Example: 'com.companyname.appname'
+ repeated string allowed_package_names = 1;
+}
+
+// Settings specific to keys that can be used by iOS apps.
+message IOSKeySettings {
+ // iOS bundle ids of apps allowed to use the key.
+ // Example: 'com.companyname.productname.appname'
+ repeated string allowed_bundle_ids = 1;
+}
diff --git a/synth.metadata b/synth.metadata
index 12afe062..6d0be98c 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,5 +1,5 @@
{
- "updateTime": "2019-11-21T18:15:03.057228Z",
+ "updateTime": "2019-11-30T08:51:47.173480Z",
"sources": [
{
"generator": {
@@ -19,8 +19,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "902b51f2073e9958a2aba441f7f7ac54ea00966d",
- "internalRef": "281769522"
+ "sha": "6ab0171e3688bfdcf3dbc4056e2df6345e843565",
+ "internalRef": "283066965"
}
},
{