diff --git a/google-api-grpc/grpc-google-cloud-webrisk-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-webrisk-v1beta1/pom.xml
new file mode 100644
index 000000000000..934c4c2693a7
--- /dev/null
+++ b/google-api-grpc/grpc-google-cloud-webrisk-v1beta1/pom.xml
@@ -0,0 +1,31 @@
+
+ * Web Risk v1beta1 API defines an interface to detect malicious URLs on your + * website and in client applications. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/webrisk/v1beta1/webrisk.proto") +public final class WebRiskServiceV1Beta1Grpc { + + private WebRiskServiceV1Beta1Grpc() {} + + public static final String SERVICE_NAME = "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getComputeThreatListDiffMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest, + com.google.webrisk.v1beta1.ComputeThreatListDiffResponse> + METHOD_COMPUTE_THREAT_LIST_DIFF = getComputeThreatListDiffMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest, + com.google.webrisk.v1beta1.ComputeThreatListDiffResponse> + getComputeThreatListDiffMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest, + com.google.webrisk.v1beta1.ComputeThreatListDiffResponse> + getComputeThreatListDiffMethod() { + return getComputeThreatListDiffMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest, + com.google.webrisk.v1beta1.ComputeThreatListDiffResponse> + getComputeThreatListDiffMethodHelper() { + io.grpc.MethodDescriptor< + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest, + com.google.webrisk.v1beta1.ComputeThreatListDiffResponse> + getComputeThreatListDiffMethod; + if ((getComputeThreatListDiffMethod = WebRiskServiceV1Beta1Grpc.getComputeThreatListDiffMethod) + == null) { + synchronized (WebRiskServiceV1Beta1Grpc.class) { + if ((getComputeThreatListDiffMethod = + WebRiskServiceV1Beta1Grpc.getComputeThreatListDiffMethod) + == null) { + WebRiskServiceV1Beta1Grpc.getComputeThreatListDiffMethod = + getComputeThreatListDiffMethod = + io.grpc.MethodDescriptor + .
+ * Web Risk v1beta1 API defines an interface to detect malicious URLs on your + * website and in client applications. + *+ */ + public abstract static class WebRiskServiceV1Beta1ImplBase implements io.grpc.BindableService { + + /** + * + * + *
+ * Gets the most recent threat list diffs. + *+ */ + public void computeThreatListDiff( + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest request, + io.grpc.stub.StreamObserver
+ * This method is used to check whether a URI is on a given threatList. + *+ */ + public void searchUris( + com.google.webrisk.v1beta1.SearchUrisRequest request, + io.grpc.stub.StreamObserver
+ * Gets the full hashes that match the requested hash prefix. + * This is used after a hash prefix is looked up in a threatList + * and there is a match. The client side threatList only holds partial hashes + * so the client must query this method to determine if there is a full + * hash match of a threat. + *+ */ + public void searchHashes( + com.google.webrisk.v1beta1.SearchHashesRequest request, + io.grpc.stub.StreamObserver
+ * Web Risk v1beta1 API defines an interface to detect malicious URLs on your + * website and in client applications. + *+ */ + public static final class WebRiskServiceV1Beta1Stub + extends io.grpc.stub.AbstractStub
+ * Gets the most recent threat list diffs. + *+ */ + public void computeThreatListDiff( + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest request, + io.grpc.stub.StreamObserver
+ * This method is used to check whether a URI is on a given threatList. + *+ */ + public void searchUris( + com.google.webrisk.v1beta1.SearchUrisRequest request, + io.grpc.stub.StreamObserver
+ * Gets the full hashes that match the requested hash prefix. + * This is used after a hash prefix is looked up in a threatList + * and there is a match. The client side threatList only holds partial hashes + * so the client must query this method to determine if there is a full + * hash match of a threat. + *+ */ + public void searchHashes( + com.google.webrisk.v1beta1.SearchHashesRequest request, + io.grpc.stub.StreamObserver
+ * Web Risk v1beta1 API defines an interface to detect malicious URLs on your + * website and in client applications. + *+ */ + public static final class WebRiskServiceV1Beta1BlockingStub + extends io.grpc.stub.AbstractStub
+ * Gets the most recent threat list diffs. + *+ */ + public com.google.webrisk.v1beta1.ComputeThreatListDiffResponse computeThreatListDiff( + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest request) { + return blockingUnaryCall( + getChannel(), getComputeThreatListDiffMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * This method is used to check whether a URI is on a given threatList. + *+ */ + public com.google.webrisk.v1beta1.SearchUrisResponse searchUris( + com.google.webrisk.v1beta1.SearchUrisRequest request) { + return blockingUnaryCall( + getChannel(), getSearchUrisMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets the full hashes that match the requested hash prefix. + * This is used after a hash prefix is looked up in a threatList + * and there is a match. The client side threatList only holds partial hashes + * so the client must query this method to determine if there is a full + * hash match of a threat. + *+ */ + public com.google.webrisk.v1beta1.SearchHashesResponse searchHashes( + com.google.webrisk.v1beta1.SearchHashesRequest request) { + return blockingUnaryCall( + getChannel(), getSearchHashesMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+ * Web Risk v1beta1 API defines an interface to detect malicious URLs on your + * website and in client applications. + *+ */ + public static final class WebRiskServiceV1Beta1FutureStub + extends io.grpc.stub.AbstractStub
+ * Gets the most recent threat list diffs. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.webrisk.v1beta1.ComputeThreatListDiffResponse> + computeThreatListDiff(com.google.webrisk.v1beta1.ComputeThreatListDiffRequest request) { + return futureUnaryCall( + getChannel().newCall(getComputeThreatListDiffMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * This method is used to check whether a URI is on a given threatList. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.webrisk.v1beta1.SearchUrisResponse> + searchUris(com.google.webrisk.v1beta1.SearchUrisRequest request) { + return futureUnaryCall( + getChannel().newCall(getSearchUrisMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Gets the full hashes that match the requested hash prefix. + * This is used after a hash prefix is looked up in a threatList + * and there is a match. The client side threatList only holds partial hashes + * so the client must query this method to determine if there is a full + * hash match of a threat. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.webrisk.v1beta1.SearchHashesResponse> + searchHashes(com.google.webrisk.v1beta1.SearchHashesRequest request) { + return futureUnaryCall( + getChannel().newCall(getSearchHashesMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_COMPUTE_THREAT_LIST_DIFF = 0; + private static final int METHODID_SEARCH_URIS = 1; + private static final int METHODID_SEARCH_HASHES = 2; + + private static final class MethodHandlers
+ * The ways in which threat entry sets can be compressed. + *+ * + * Protobuf enum {@code google.cloud.webrisk.v1beta1.CompressionType} + */ +public enum CompressionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Unknown. + *+ * + *
COMPRESSION_TYPE_UNSPECIFIED = 0;
+ */
+ COMPRESSION_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Raw, uncompressed data. + *+ * + *
RAW = 1;
+ */
+ RAW(1),
+ /**
+ *
+ *
+ * + * Rice-Golomb encoded data. + *+ * + *
RICE = 2;
+ */
+ RICE(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Unknown. + *+ * + *
COMPRESSION_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int COMPRESSION_TYPE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Raw, uncompressed data. + *+ * + *
RAW = 1;
+ */
+ public static final int RAW_VALUE = 1;
+ /**
+ *
+ *
+ * + * Rice-Golomb encoded data. + *+ * + *
RICE = 2;
+ */
+ public static final int RICE_VALUE = 2;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /** @deprecated Use {@link #forNumber(int)} instead. */
+ @java.lang.Deprecated
+ public static CompressionType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static CompressionType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return COMPRESSION_TYPE_UNSPECIFIED;
+ case 1:
+ return RAW;
+ case 2:
+ return RICE;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Describes an API diff request. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} + */ +public final class ComputeThreatListDiffRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest) + ComputeThreatListDiffRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeThreatListDiffRequest.newBuilder() to construct. + private ComputeThreatListDiffRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ComputeThreatListDiffRequest() { + threatType_ = 0; + versionToken_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ComputeThreatListDiffRequest( + 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 8: + { + int rawValue = input.readEnum(); + + threatType_ = rawValue; + break; + } + case 18: + { + versionToken_ = input.readBytes(); + break; + } + case 26: + { + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder + subBuilder = null; + if (constraints_ != null) { + subBuilder = constraints_.toBuilder(); + } + constraints_ = + input.readMessage( + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(constraints_); + constraints_ = 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.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.class, + com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Builder.class); + } + + public interface ConstraintsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+ * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + *+ * + *
int32 max_diff_entries = 1;
+ */
+ int getMaxDiffEntries();
+
+ /**
+ *
+ *
+ * + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + *+ * + *
int32 max_database_entries = 2;
+ */
+ int getMaxDatabaseEntries();
+
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ java.util.List+ * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ int getSupportedCompressionsCount();
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ com.google.webrisk.v1beta1.CompressionType getSupportedCompressions(int index);
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ java.util.List+ * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ int getSupportedCompressionsValue(int index);
+ }
+ /**
+ *
+ *
+ * + * The constraints for this diff. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} + */ + public static final class Constraints extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) + ConstraintsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Constraints.newBuilder() to construct. + private Constraints(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Constraints() { + supportedCompressions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Constraints( + 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 8: + { + maxDiffEntries_ = input.readInt32(); + break; + } + case 16: + { + maxDatabaseEntries_ = input.readInt32(); + break; + } + case 24: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + supportedCompressions_ = new java.util.ArrayList
+ * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + *+ * + *
int32 max_diff_entries = 1;
+ */
+ public int getMaxDiffEntries() {
+ return maxDiffEntries_;
+ }
+
+ public static final int MAX_DATABASE_ENTRIES_FIELD_NUMBER = 2;
+ private int maxDatabaseEntries_;
+ /**
+ *
+ *
+ * + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + *+ * + *
int32 max_database_entries = 2;
+ */
+ public int getMaxDatabaseEntries() {
+ return maxDatabaseEntries_;
+ }
+
+ public static final int SUPPORTED_COMPRESSIONS_FIELD_NUMBER = 3;
+ private java.util.List+ * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public java.util.List+ * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public int getSupportedCompressionsCount() {
+ return supportedCompressions_.size();
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public com.google.webrisk.v1beta1.CompressionType getSupportedCompressions(int index) {
+ return supportedCompressions_converter_.convert(supportedCompressions_.get(index));
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public java.util.List+ * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public int getSupportedCompressionsValue(int index) {
+ return supportedCompressions_.get(index);
+ }
+
+ private int supportedCompressionsMemoizedSerializedSize;
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ getSerializedSize();
+ if (maxDiffEntries_ != 0) {
+ output.writeInt32(1, maxDiffEntries_);
+ }
+ if (maxDatabaseEntries_ != 0) {
+ output.writeInt32(2, maxDatabaseEntries_);
+ }
+ if (getSupportedCompressionsList().size() > 0) {
+ output.writeUInt32NoTag(26);
+ output.writeUInt32NoTag(supportedCompressionsMemoizedSerializedSize);
+ }
+ for (int i = 0; i < supportedCompressions_.size(); i++) {
+ output.writeEnumNoTag(supportedCompressions_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (maxDiffEntries_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxDiffEntries_);
+ }
+ if (maxDatabaseEntries_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxDatabaseEntries_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < supportedCompressions_.size(); i++) {
+ dataSize +=
+ com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(
+ supportedCompressions_.get(i));
+ }
+ size += dataSize;
+ if (!getSupportedCompressionsList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
+ }
+ supportedCompressionsMemoizedSerializedSize = dataSize;
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints other =
+ (com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) obj;
+
+ if (getMaxDiffEntries() != other.getMaxDiffEntries()) return false;
+ if (getMaxDatabaseEntries() != other.getMaxDatabaseEntries()) return false;
+ if (!supportedCompressions_.equals(other.supportedCompressions_)) 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) + MAX_DIFF_ENTRIES_FIELD_NUMBER;
+ hash = (53 * hash) + getMaxDiffEntries();
+ hash = (37 * hash) + MAX_DATABASE_ENTRIES_FIELD_NUMBER;
+ hash = (53 * hash) + getMaxDatabaseEntries();
+ if (getSupportedCompressionsCount() > 0) {
+ hash = (37 * hash) + SUPPORTED_COMPRESSIONS_FIELD_NUMBER;
+ hash = (53 * hash) + supportedCompressions_.hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints 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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints 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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
+ 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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints 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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints 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 constraints for this diff. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + *+ * + *
int32 max_diff_entries = 1;
+ */
+ public int getMaxDiffEntries() {
+ return maxDiffEntries_;
+ }
+ /**
+ *
+ *
+ * + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + *+ * + *
int32 max_diff_entries = 1;
+ */
+ public Builder setMaxDiffEntries(int value) {
+
+ maxDiffEntries_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The maximum size in number of entries. The diff will not contain more + * entries than this value. This should be a power of 2 between 2**10 and + * 2**20. If zero, no diff size limit is set. + *+ * + *
int32 max_diff_entries = 1;
+ */
+ public Builder clearMaxDiffEntries() {
+
+ maxDiffEntries_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int maxDatabaseEntries_;
+ /**
+ *
+ *
+ * + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + *+ * + *
int32 max_database_entries = 2;
+ */
+ public int getMaxDatabaseEntries() {
+ return maxDatabaseEntries_;
+ }
+ /**
+ *
+ *
+ * + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + *+ * + *
int32 max_database_entries = 2;
+ */
+ public Builder setMaxDatabaseEntries(int value) {
+
+ maxDatabaseEntries_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Sets the maximum number of entries that the client is willing to have + * in the local database. This should be a power of 2 between 2**10 and + * 2**20. If zero, no database size limit is set. + *+ * + *
int32 max_database_entries = 2;
+ */
+ public Builder clearMaxDatabaseEntries() {
+
+ maxDatabaseEntries_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public java.util.List+ * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public int getSupportedCompressionsCount() {
+ return supportedCompressions_.size();
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public com.google.webrisk.v1beta1.CompressionType getSupportedCompressions(int index) {
+ return supportedCompressions_converter_.convert(supportedCompressions_.get(index));
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public Builder setSupportedCompressions(
+ int index, com.google.webrisk.v1beta1.CompressionType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSupportedCompressionsIsMutable();
+ supportedCompressions_.set(index, value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public Builder addSupportedCompressions(com.google.webrisk.v1beta1.CompressionType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSupportedCompressionsIsMutable();
+ supportedCompressions_.add(value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public Builder addAllSupportedCompressions(
+ java.lang.Iterable extends com.google.webrisk.v1beta1.CompressionType> values) {
+ ensureSupportedCompressionsIsMutable();
+ for (com.google.webrisk.v1beta1.CompressionType value : values) {
+ supportedCompressions_.add(value.getNumber());
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public Builder clearSupportedCompressions() {
+ supportedCompressions_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public java.util.List+ * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public int getSupportedCompressionsValue(int index) {
+ return supportedCompressions_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public Builder setSupportedCompressionsValue(int index, int value) {
+ ensureSupportedCompressionsIsMutable();
+ supportedCompressions_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public Builder addSupportedCompressionsValue(int value) {
+ ensureSupportedCompressionsIsMutable();
+ supportedCompressions_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The compression types supported by the client. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
+ *
+ */
+ public Builder addAllSupportedCompressionsValue(
+ java.lang.Iterable+ * Required. The ThreatList to update. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;
+ */
+ public int getThreatTypeValue() {
+ return threatType_;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatList to update. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatType() {
+ @SuppressWarnings("deprecation")
+ com.google.webrisk.v1beta1.ThreatType result =
+ com.google.webrisk.v1beta1.ThreatType.valueOf(threatType_);
+ return result == null ? com.google.webrisk.v1beta1.ThreatType.UNRECOGNIZED : result;
+ }
+
+ public static final int VERSION_TOKEN_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString versionToken_;
+ /**
+ *
+ *
+ * + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + *+ * + *
bytes version_token = 2;
+ */
+ public com.google.protobuf.ByteString getVersionToken() {
+ return versionToken_;
+ }
+
+ public static final int CONSTRAINTS_FIELD_NUMBER = 3;
+ private com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints_;
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public boolean hasConstraints() {
+ return constraints_ != null;
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints getConstraints() {
+ return constraints_ == null
+ ? com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.getDefaultInstance()
+ : constraints_;
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder
+ getConstraintsOrBuilder() {
+ return getConstraints();
+ }
+
+ 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 (threatType_ != com.google.webrisk.v1beta1.ThreatType.THREAT_TYPE_UNSPECIFIED.getNumber()) {
+ output.writeEnum(1, threatType_);
+ }
+ if (!versionToken_.isEmpty()) {
+ output.writeBytes(2, versionToken_);
+ }
+ if (constraints_ != null) {
+ output.writeMessage(3, getConstraints());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (threatType_ != com.google.webrisk.v1beta1.ThreatType.THREAT_TYPE_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, threatType_);
+ }
+ if (!versionToken_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, versionToken_);
+ }
+ if (constraints_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConstraints());
+ }
+ 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.webrisk.v1beta1.ComputeThreatListDiffRequest)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest other =
+ (com.google.webrisk.v1beta1.ComputeThreatListDiffRequest) obj;
+
+ if (threatType_ != other.threatType_) return false;
+ if (!getVersionToken().equals(other.getVersionToken())) return false;
+ if (hasConstraints() != other.hasConstraints()) return false;
+ if (hasConstraints()) {
+ if (!getConstraints().equals(other.getConstraints())) 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) + THREAT_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + threatType_;
+ hash = (37 * hash) + VERSION_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getVersionToken().hashCode();
+ if (hasConstraints()) {
+ hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER;
+ hash = (53 * hash) + getConstraints().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest 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.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest 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.webrisk.v1beta1.ComputeThreatListDiffRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest 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.webrisk.v1beta1.ComputeThreatListDiffRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest 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.webrisk.v1beta1.ComputeThreatListDiffRequest 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;
+ }
+ /**
+ *
+ *
+ * + * Describes an API diff request. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The ThreatList to update. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;
+ */
+ public int getThreatTypeValue() {
+ return threatType_;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatList to update. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;
+ */
+ public Builder setThreatTypeValue(int value) {
+ threatType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatList to update. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatType() {
+ @SuppressWarnings("deprecation")
+ com.google.webrisk.v1beta1.ThreatType result =
+ com.google.webrisk.v1beta1.ThreatType.valueOf(threatType_);
+ return result == null ? com.google.webrisk.v1beta1.ThreatType.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatList to update. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;
+ */
+ public Builder setThreatType(com.google.webrisk.v1beta1.ThreatType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ threatType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatList to update. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;
+ */
+ public Builder clearThreatType() {
+
+ threatType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString versionToken_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ *
+ * + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + *+ * + *
bytes version_token = 2;
+ */
+ public com.google.protobuf.ByteString getVersionToken() {
+ return versionToken_;
+ }
+ /**
+ *
+ *
+ * + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + *+ * + *
bytes version_token = 2;
+ */
+ public Builder setVersionToken(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ versionToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + *+ * + *
bytes version_token = 2;
+ */
+ public Builder clearVersionToken() {
+
+ versionToken_ = getDefaultInstance().getVersionToken();
+ onChanged();
+ return this;
+ }
+
+ private com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder>
+ constraintsBuilder_;
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public boolean hasConstraints() {
+ return constraintsBuilder_ != null || constraints_ != null;
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints getConstraints() {
+ if (constraintsBuilder_ == null) {
+ return constraints_ == null
+ ? com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
+ .getDefaultInstance()
+ : constraints_;
+ } else {
+ return constraintsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public Builder setConstraints(
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints value) {
+ if (constraintsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ constraints_ = value;
+ onChanged();
+ } else {
+ constraintsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public Builder setConstraints(
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder
+ builderForValue) {
+ if (constraintsBuilder_ == null) {
+ constraints_ = builderForValue.build();
+ onChanged();
+ } else {
+ constraintsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public Builder mergeConstraints(
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints value) {
+ if (constraintsBuilder_ == null) {
+ if (constraints_ != null) {
+ constraints_ =
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.newBuilder(
+ constraints_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ constraints_ = value;
+ }
+ onChanged();
+ } else {
+ constraintsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public Builder clearConstraints() {
+ if (constraintsBuilder_ == null) {
+ constraints_ = null;
+ onChanged();
+ } else {
+ constraints_ = null;
+ constraintsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder
+ getConstraintsBuilder() {
+
+ onChanged();
+ return getConstraintsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder
+ getConstraintsOrBuilder() {
+ if (constraintsBuilder_ != null) {
+ return constraintsBuilder_.getMessageOrBuilder();
+ } else {
+ return constraints_ == null
+ ? com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
+ .getDefaultInstance()
+ : constraints_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder>
+ getConstraintsFieldBuilder() {
+ if (constraintsBuilder_ == null) {
+ constraintsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder>(
+ getConstraints(), getParentForChildren(), isClean());
+ constraints_ = null;
+ }
+ return constraintsBuilder_;
+ }
+
+ @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.webrisk.v1beta1.ComputeThreatListDiffRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest)
+ private static final com.google.webrisk.v1beta1.ComputeThreatListDiffRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.ComputeThreatListDiffRequest();
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The ThreatList to update. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;
+ */
+ int getThreatTypeValue();
+ /**
+ *
+ *
+ * + * Required. The ThreatList to update. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatType threat_type = 1;
+ */
+ com.google.webrisk.v1beta1.ThreatType getThreatType();
+
+ /**
+ *
+ *
+ * + * The current version token of the client for the requested list (the + * client version that was received from the last successful diff). + *+ * + *
bytes version_token = 2;
+ */
+ com.google.protobuf.ByteString getVersionToken();
+
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ boolean hasConstraints();
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints getConstraints();
+ /**
+ *
+ *
+ * + * The constraints associated with this request. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3;
+ *
+ */
+ com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder
+ getConstraintsOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ComputeThreatListDiffResponse.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ComputeThreatListDiffResponse.java
new file mode 100644
index 000000000000..f95919b1da51
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ComputeThreatListDiffResponse.java
@@ -0,0 +1,2540 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/** Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} */
+public final class ComputeThreatListDiffResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse)
+ ComputeThreatListDiffResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use ComputeThreatListDiffResponse.newBuilder() to construct.
+ private ComputeThreatListDiffResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private ComputeThreatListDiffResponse() {
+ responseType_ = 0;
+ newVersionToken_ = com.google.protobuf.ByteString.EMPTY;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private ComputeThreatListDiffResponse(
+ 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 18:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (recommendedNextDiff_ != null) {
+ subBuilder = recommendedNextDiff_.toBuilder();
+ }
+ recommendedNextDiff_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(recommendedNextDiff_);
+ recommendedNextDiff_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 32:
+ {
+ int rawValue = input.readEnum();
+
+ responseType_ = rawValue;
+ break;
+ }
+ case 42:
+ {
+ com.google.webrisk.v1beta1.ThreatEntryAdditions.Builder subBuilder = null;
+ if (additions_ != null) {
+ subBuilder = additions_.toBuilder();
+ }
+ additions_ =
+ input.readMessage(
+ com.google.webrisk.v1beta1.ThreatEntryAdditions.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(additions_);
+ additions_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 50:
+ {
+ com.google.webrisk.v1beta1.ThreatEntryRemovals.Builder subBuilder = null;
+ if (removals_ != null) {
+ subBuilder = removals_.toBuilder();
+ }
+ removals_ =
+ input.readMessage(
+ com.google.webrisk.v1beta1.ThreatEntryRemovals.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(removals_);
+ removals_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 58:
+ {
+ newVersionToken_ = input.readBytes();
+ break;
+ }
+ case 66:
+ {
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.Builder subBuilder =
+ null;
+ if (checksum_ != null) {
+ subBuilder = checksum_.toBuilder();
+ }
+ checksum_ =
+ input.readMessage(
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(checksum_);
+ checksum_ = 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.webrisk.v1beta1.WebRiskProto
+ .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.webrisk.v1beta1.WebRiskProto
+ .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.class,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Builder.class);
+ }
+
+ /**
+ *
+ *
+ * + * The type of response sent to the client. + *+ * + * Protobuf enum {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType} + */ + public enum ResponseType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Unknown. + *+ * + *
RESPONSE_TYPE_UNSPECIFIED = 0;
+ */
+ RESPONSE_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Partial updates are applied to the client's existing local database. + *+ * + *
DIFF = 1;
+ */
+ DIFF(1),
+ /**
+ *
+ *
+ * + * Full updates resets the client's entire local database. This means + * that either the client had no state, was seriously out-of-date, + * or the client is believed to be corrupt. + *+ * + *
RESET = 2;
+ */
+ RESET(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Unknown. + *+ * + *
RESPONSE_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int RESPONSE_TYPE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Partial updates are applied to the client's existing local database. + *+ * + *
DIFF = 1;
+ */
+ public static final int DIFF_VALUE = 1;
+ /**
+ *
+ *
+ * + * Full updates resets the client's entire local database. This means + * that either the client had no state, was seriously out-of-date, + * or the client is believed to be corrupt. + *+ * + *
RESET = 2;
+ */
+ public static final int RESET_VALUE = 2;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /** @deprecated Use {@link #forNumber(int)} instead. */
+ @java.lang.Deprecated
+ public static ResponseType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static ResponseType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return RESPONSE_TYPE_UNSPECIFIED;
+ case 1:
+ return DIFF;
+ case 2:
+ return RESET;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + *+ * + *
bytes sha256 = 1;
+ */
+ com.google.protobuf.ByteString getSha256();
+ }
+ /**
+ *
+ *
+ * + * The expected state of a client's local database. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} + */ + public static final class Checksum extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum) + ChecksumOrBuilder { + private static final long serialVersionUID = 0L; + // Use Checksum.newBuilder() to construct. + private Checksum(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Checksum() { + sha256_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Checksum( + 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: + { + sha256_ = input.readBytes(); + 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.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffResponse_Checksum_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffResponse_Checksum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.class, + com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.Builder.class); + } + + public static final int SHA256_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString sha256_; + /** + * + * + *
+ * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + *+ * + *
bytes sha256 = 1;
+ */
+ public com.google.protobuf.ByteString getSha256() {
+ return sha256_;
+ }
+
+ 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 (!sha256_.isEmpty()) {
+ output.writeBytes(1, sha256_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!sha256_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, sha256_);
+ }
+ 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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum other =
+ (com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum) obj;
+
+ if (!getSha256().equals(other.getSha256())) 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) + SHA256_FIELD_NUMBER;
+ hash = (53 * hash) + getSha256().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum 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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum 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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum
+ 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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum 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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum 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 expected state of a client's local database. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + *+ * + *
bytes sha256 = 1;
+ */
+ public com.google.protobuf.ByteString getSha256() {
+ return sha256_;
+ }
+ /**
+ *
+ *
+ * + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + *+ * + *
bytes sha256 = 1;
+ */
+ public Builder setSha256(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ sha256_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The SHA256 hash of the client state; that is, of the sorted list of all + * hashes present in the database. + *+ * + *
bytes sha256 = 1;
+ */
+ public Builder clearSha256() {
+
+ sha256_ = getDefaultInstance().getSha256();
+ 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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum)
+ private static final com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum();
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The type of response. This may indicate that an action is required by the + * client when the response is received. + *+ * + *
+ * .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;
+ *
+ */
+ public int getResponseTypeValue() {
+ return responseType_;
+ }
+ /**
+ *
+ *
+ * + * The type of response. This may indicate that an action is required by the + * client when the response is received. + *+ * + *
+ * .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType getResponseType() {
+ @SuppressWarnings("deprecation")
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType result =
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType.valueOf(
+ responseType_);
+ return result == null
+ ? com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int ADDITIONS_FIELD_NUMBER = 5;
+ private com.google.webrisk.v1beta1.ThreatEntryAdditions additions_;
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public boolean hasAdditions() {
+ return additions_ != null;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryAdditions getAdditions() {
+ return additions_ == null
+ ? com.google.webrisk.v1beta1.ThreatEntryAdditions.getDefaultInstance()
+ : additions_;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryAdditionsOrBuilder getAdditionsOrBuilder() {
+ return getAdditions();
+ }
+
+ public static final int REMOVALS_FIELD_NUMBER = 6;
+ private com.google.webrisk.v1beta1.ThreatEntryRemovals removals_;
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public boolean hasRemovals() {
+ return removals_ != null;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryRemovals getRemovals() {
+ return removals_ == null
+ ? com.google.webrisk.v1beta1.ThreatEntryRemovals.getDefaultInstance()
+ : removals_;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryRemovalsOrBuilder getRemovalsOrBuilder() {
+ return getRemovals();
+ }
+
+ public static final int NEW_VERSION_TOKEN_FIELD_NUMBER = 7;
+ private com.google.protobuf.ByteString newVersionToken_;
+ /**
+ *
+ *
+ * + * The new opaque client version token. + *+ * + *
bytes new_version_token = 7;
+ */
+ public com.google.protobuf.ByteString getNewVersionToken() {
+ return newVersionToken_;
+ }
+
+ public static final int CHECKSUM_FIELD_NUMBER = 8;
+ private com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum_;
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ */
+ public boolean hasChecksum() {
+ return checksum_ != null;
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum getChecksum() {
+ return checksum_ == null
+ ? com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.getDefaultInstance()
+ : checksum_;
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ChecksumOrBuilder
+ getChecksumOrBuilder() {
+ return getChecksum();
+ }
+
+ public static final int RECOMMENDED_NEXT_DIFF_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp recommendedNextDiff_;
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public boolean hasRecommendedNextDiff() {
+ return recommendedNextDiff_ != null;
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public com.google.protobuf.Timestamp getRecommendedNextDiff() {
+ return recommendedNextDiff_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : recommendedNextDiff_;
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getRecommendedNextDiffOrBuilder() {
+ return getRecommendedNextDiff();
+ }
+
+ 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 (recommendedNextDiff_ != null) {
+ output.writeMessage(2, getRecommendedNextDiff());
+ }
+ if (responseType_
+ != com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType
+ .RESPONSE_TYPE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(4, responseType_);
+ }
+ if (additions_ != null) {
+ output.writeMessage(5, getAdditions());
+ }
+ if (removals_ != null) {
+ output.writeMessage(6, getRemovals());
+ }
+ if (!newVersionToken_.isEmpty()) {
+ output.writeBytes(7, newVersionToken_);
+ }
+ if (checksum_ != null) {
+ output.writeMessage(8, getChecksum());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (recommendedNextDiff_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRecommendedNextDiff());
+ }
+ if (responseType_
+ != com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType
+ .RESPONSE_TYPE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, responseType_);
+ }
+ if (additions_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAdditions());
+ }
+ if (removals_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getRemovals());
+ }
+ if (!newVersionToken_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(7, newVersionToken_);
+ }
+ if (checksum_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getChecksum());
+ }
+ 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.webrisk.v1beta1.ComputeThreatListDiffResponse)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse other =
+ (com.google.webrisk.v1beta1.ComputeThreatListDiffResponse) obj;
+
+ if (responseType_ != other.responseType_) return false;
+ if (hasAdditions() != other.hasAdditions()) return false;
+ if (hasAdditions()) {
+ if (!getAdditions().equals(other.getAdditions())) return false;
+ }
+ if (hasRemovals() != other.hasRemovals()) return false;
+ if (hasRemovals()) {
+ if (!getRemovals().equals(other.getRemovals())) return false;
+ }
+ if (!getNewVersionToken().equals(other.getNewVersionToken())) return false;
+ if (hasChecksum() != other.hasChecksum()) return false;
+ if (hasChecksum()) {
+ if (!getChecksum().equals(other.getChecksum())) return false;
+ }
+ if (hasRecommendedNextDiff() != other.hasRecommendedNextDiff()) return false;
+ if (hasRecommendedNextDiff()) {
+ if (!getRecommendedNextDiff().equals(other.getRecommendedNextDiff())) 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) + RESPONSE_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + responseType_;
+ if (hasAdditions()) {
+ hash = (37 * hash) + ADDITIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getAdditions().hashCode();
+ }
+ if (hasRemovals()) {
+ hash = (37 * hash) + REMOVALS_FIELD_NUMBER;
+ hash = (53 * hash) + getRemovals().hashCode();
+ }
+ hash = (37 * hash) + NEW_VERSION_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNewVersionToken().hashCode();
+ if (hasChecksum()) {
+ hash = (37 * hash) + CHECKSUM_FIELD_NUMBER;
+ hash = (53 * hash) + getChecksum().hashCode();
+ }
+ if (hasRecommendedNextDiff()) {
+ hash = (37 * hash) + RECOMMENDED_NEXT_DIFF_FIELD_NUMBER;
+ hash = (53 * hash) + getRecommendedNextDiff().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse 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.webrisk.v1beta1.ComputeThreatListDiffResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse 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.webrisk.v1beta1.ComputeThreatListDiffResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse 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.webrisk.v1beta1.ComputeThreatListDiffResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse 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.webrisk.v1beta1.ComputeThreatListDiffResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /** Protobuf type {@code google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder+ * The type of response. This may indicate that an action is required by the + * client when the response is received. + *+ * + *
+ * .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;
+ *
+ */
+ public int getResponseTypeValue() {
+ return responseType_;
+ }
+ /**
+ *
+ *
+ * + * The type of response. This may indicate that an action is required by the + * client when the response is received. + *+ * + *
+ * .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;
+ *
+ */
+ public Builder setResponseTypeValue(int value) {
+ responseType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The type of response. This may indicate that an action is required by the + * client when the response is received. + *+ * + *
+ * .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType getResponseType() {
+ @SuppressWarnings("deprecation")
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType result =
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType.valueOf(
+ responseType_);
+ return result == null
+ ? com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * The type of response. This may indicate that an action is required by the + * client when the response is received. + *+ * + *
+ * .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;
+ *
+ */
+ public Builder setResponseType(
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ responseType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The type of response. This may indicate that an action is required by the + * client when the response is received. + *+ * + *
+ * .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;
+ *
+ */
+ public Builder clearResponseType() {
+
+ responseType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.webrisk.v1beta1.ThreatEntryAdditions additions_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ThreatEntryAdditions,
+ com.google.webrisk.v1beta1.ThreatEntryAdditions.Builder,
+ com.google.webrisk.v1beta1.ThreatEntryAdditionsOrBuilder>
+ additionsBuilder_;
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public boolean hasAdditions() {
+ return additionsBuilder_ != null || additions_ != null;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryAdditions getAdditions() {
+ if (additionsBuilder_ == null) {
+ return additions_ == null
+ ? com.google.webrisk.v1beta1.ThreatEntryAdditions.getDefaultInstance()
+ : additions_;
+ } else {
+ return additionsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public Builder setAdditions(com.google.webrisk.v1beta1.ThreatEntryAdditions value) {
+ if (additionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ additions_ = value;
+ onChanged();
+ } else {
+ additionsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public Builder setAdditions(
+ com.google.webrisk.v1beta1.ThreatEntryAdditions.Builder builderForValue) {
+ if (additionsBuilder_ == null) {
+ additions_ = builderForValue.build();
+ onChanged();
+ } else {
+ additionsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public Builder mergeAdditions(com.google.webrisk.v1beta1.ThreatEntryAdditions value) {
+ if (additionsBuilder_ == null) {
+ if (additions_ != null) {
+ additions_ =
+ com.google.webrisk.v1beta1.ThreatEntryAdditions.newBuilder(additions_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ additions_ = value;
+ }
+ onChanged();
+ } else {
+ additionsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public Builder clearAdditions() {
+ if (additionsBuilder_ == null) {
+ additions_ = null;
+ onChanged();
+ } else {
+ additions_ = null;
+ additionsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryAdditions.Builder getAdditionsBuilder() {
+
+ onChanged();
+ return getAdditionsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryAdditionsOrBuilder getAdditionsOrBuilder() {
+ if (additionsBuilder_ != null) {
+ return additionsBuilder_.getMessageOrBuilder();
+ } else {
+ return additions_ == null
+ ? com.google.webrisk.v1beta1.ThreatEntryAdditions.getDefaultInstance()
+ : additions_;
+ }
+ }
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ThreatEntryAdditions,
+ com.google.webrisk.v1beta1.ThreatEntryAdditions.Builder,
+ com.google.webrisk.v1beta1.ThreatEntryAdditionsOrBuilder>
+ getAdditionsFieldBuilder() {
+ if (additionsBuilder_ == null) {
+ additionsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ThreatEntryAdditions,
+ com.google.webrisk.v1beta1.ThreatEntryAdditions.Builder,
+ com.google.webrisk.v1beta1.ThreatEntryAdditionsOrBuilder>(
+ getAdditions(), getParentForChildren(), isClean());
+ additions_ = null;
+ }
+ return additionsBuilder_;
+ }
+
+ private com.google.webrisk.v1beta1.ThreatEntryRemovals removals_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ThreatEntryRemovals,
+ com.google.webrisk.v1beta1.ThreatEntryRemovals.Builder,
+ com.google.webrisk.v1beta1.ThreatEntryRemovalsOrBuilder>
+ removalsBuilder_;
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public boolean hasRemovals() {
+ return removalsBuilder_ != null || removals_ != null;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryRemovals getRemovals() {
+ if (removalsBuilder_ == null) {
+ return removals_ == null
+ ? com.google.webrisk.v1beta1.ThreatEntryRemovals.getDefaultInstance()
+ : removals_;
+ } else {
+ return removalsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public Builder setRemovals(com.google.webrisk.v1beta1.ThreatEntryRemovals value) {
+ if (removalsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ removals_ = value;
+ onChanged();
+ } else {
+ removalsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public Builder setRemovals(
+ com.google.webrisk.v1beta1.ThreatEntryRemovals.Builder builderForValue) {
+ if (removalsBuilder_ == null) {
+ removals_ = builderForValue.build();
+ onChanged();
+ } else {
+ removalsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public Builder mergeRemovals(com.google.webrisk.v1beta1.ThreatEntryRemovals value) {
+ if (removalsBuilder_ == null) {
+ if (removals_ != null) {
+ removals_ =
+ com.google.webrisk.v1beta1.ThreatEntryRemovals.newBuilder(removals_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ removals_ = value;
+ }
+ onChanged();
+ } else {
+ removalsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public Builder clearRemovals() {
+ if (removalsBuilder_ == null) {
+ removals_ = null;
+ onChanged();
+ } else {
+ removals_ = null;
+ removalsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryRemovals.Builder getRemovalsBuilder() {
+
+ onChanged();
+ return getRemovalsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ public com.google.webrisk.v1beta1.ThreatEntryRemovalsOrBuilder getRemovalsOrBuilder() {
+ if (removalsBuilder_ != null) {
+ return removalsBuilder_.getMessageOrBuilder();
+ } else {
+ return removals_ == null
+ ? com.google.webrisk.v1beta1.ThreatEntryRemovals.getDefaultInstance()
+ : removals_;
+ }
+ }
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ThreatEntryRemovals,
+ com.google.webrisk.v1beta1.ThreatEntryRemovals.Builder,
+ com.google.webrisk.v1beta1.ThreatEntryRemovalsOrBuilder>
+ getRemovalsFieldBuilder() {
+ if (removalsBuilder_ == null) {
+ removalsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ThreatEntryRemovals,
+ com.google.webrisk.v1beta1.ThreatEntryRemovals.Builder,
+ com.google.webrisk.v1beta1.ThreatEntryRemovalsOrBuilder>(
+ getRemovals(), getParentForChildren(), isClean());
+ removals_ = null;
+ }
+ return removalsBuilder_;
+ }
+
+ private com.google.protobuf.ByteString newVersionToken_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ *
+ * + * The new opaque client version token. + *+ * + *
bytes new_version_token = 7;
+ */
+ public com.google.protobuf.ByteString getNewVersionToken() {
+ return newVersionToken_;
+ }
+ /**
+ *
+ *
+ * + * The new opaque client version token. + *+ * + *
bytes new_version_token = 7;
+ */
+ public Builder setNewVersionToken(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ newVersionToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The new opaque client version token. + *+ * + *
bytes new_version_token = 7;
+ */
+ public Builder clearNewVersionToken() {
+
+ newVersionToken_ = getDefaultInstance().getNewVersionToken();
+ onChanged();
+ return this;
+ }
+
+ private com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.Builder,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ChecksumOrBuilder>
+ checksumBuilder_;
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ *
+ */
+ public boolean hasChecksum() {
+ return checksumBuilder_ != null || checksum_ != null;
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum getChecksum() {
+ if (checksumBuilder_ == null) {
+ return checksum_ == null
+ ? com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.getDefaultInstance()
+ : checksum_;
+ } else {
+ return checksumBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ *
+ */
+ public Builder setChecksum(
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum value) {
+ if (checksumBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checksum_ = value;
+ onChanged();
+ } else {
+ checksumBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ *
+ */
+ public Builder setChecksum(
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.Builder builderForValue) {
+ if (checksumBuilder_ == null) {
+ checksum_ = builderForValue.build();
+ onChanged();
+ } else {
+ checksumBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ *
+ */
+ public Builder mergeChecksum(
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum value) {
+ if (checksumBuilder_ == null) {
+ if (checksum_ != null) {
+ checksum_ =
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.newBuilder(
+ checksum_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ checksum_ = value;
+ }
+ onChanged();
+ } else {
+ checksumBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ *
+ */
+ public Builder clearChecksum() {
+ if (checksumBuilder_ == null) {
+ checksum_ = null;
+ onChanged();
+ } else {
+ checksum_ = null;
+ checksumBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.Builder
+ getChecksumBuilder() {
+
+ onChanged();
+ return getChecksumFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ *
+ */
+ public com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ChecksumOrBuilder
+ getChecksumOrBuilder() {
+ if (checksumBuilder_ != null) {
+ return checksumBuilder_.getMessageOrBuilder();
+ } else {
+ return checksum_ == null
+ ? com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.getDefaultInstance()
+ : checksum_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.Builder,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ChecksumOrBuilder>
+ getChecksumFieldBuilder() {
+ if (checksumBuilder_ == null) {
+ checksumBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.Builder,
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ChecksumOrBuilder>(
+ getChecksum(), getParentForChildren(), isClean());
+ checksum_ = null;
+ }
+ return checksumBuilder_;
+ }
+
+ private com.google.protobuf.Timestamp recommendedNextDiff_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ recommendedNextDiffBuilder_;
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public boolean hasRecommendedNextDiff() {
+ return recommendedNextDiffBuilder_ != null || recommendedNextDiff_ != null;
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public com.google.protobuf.Timestamp getRecommendedNextDiff() {
+ if (recommendedNextDiffBuilder_ == null) {
+ return recommendedNextDiff_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : recommendedNextDiff_;
+ } else {
+ return recommendedNextDiffBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public Builder setRecommendedNextDiff(com.google.protobuf.Timestamp value) {
+ if (recommendedNextDiffBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ recommendedNextDiff_ = value;
+ onChanged();
+ } else {
+ recommendedNextDiffBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public Builder setRecommendedNextDiff(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (recommendedNextDiffBuilder_ == null) {
+ recommendedNextDiff_ = builderForValue.build();
+ onChanged();
+ } else {
+ recommendedNextDiffBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public Builder mergeRecommendedNextDiff(com.google.protobuf.Timestamp value) {
+ if (recommendedNextDiffBuilder_ == null) {
+ if (recommendedNextDiff_ != null) {
+ recommendedNextDiff_ =
+ com.google.protobuf.Timestamp.newBuilder(recommendedNextDiff_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ recommendedNextDiff_ = value;
+ }
+ onChanged();
+ } else {
+ recommendedNextDiffBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public Builder clearRecommendedNextDiff() {
+ if (recommendedNextDiffBuilder_ == null) {
+ recommendedNextDiff_ = null;
+ onChanged();
+ } else {
+ recommendedNextDiff_ = null;
+ recommendedNextDiffBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getRecommendedNextDiffBuilder() {
+
+ onChanged();
+ return getRecommendedNextDiffFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getRecommendedNextDiffOrBuilder() {
+ if (recommendedNextDiffBuilder_ != null) {
+ return recommendedNextDiffBuilder_.getMessageOrBuilder();
+ } else {
+ return recommendedNextDiff_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : recommendedNextDiff_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getRecommendedNextDiffFieldBuilder() {
+ if (recommendedNextDiffBuilder_ == null) {
+ recommendedNextDiffBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getRecommendedNextDiff(), getParentForChildren(), isClean());
+ recommendedNextDiff_ = null;
+ }
+ return recommendedNextDiffBuilder_;
+ }
+
+ @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.webrisk.v1beta1.ComputeThreatListDiffResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse)
+ private static final com.google.webrisk.v1beta1.ComputeThreatListDiffResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.ComputeThreatListDiffResponse();
+ }
+
+ public static com.google.webrisk.v1beta1.ComputeThreatListDiffResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The type of response. This may indicate that an action is required by the + * client when the response is received. + *+ * + *
+ * .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;
+ *
+ */
+ int getResponseTypeValue();
+ /**
+ *
+ *
+ * + * The type of response. This may indicate that an action is required by the + * client when the response is received. + *+ * + *
+ * .google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType response_type = 4;
+ *
+ */
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType getResponseType();
+
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ boolean hasAdditions();
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ com.google.webrisk.v1beta1.ThreatEntryAdditions getAdditions();
+ /**
+ *
+ *
+ * + * A set of entries to add to a local threat type's list. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryAdditions additions = 5;
+ */
+ com.google.webrisk.v1beta1.ThreatEntryAdditionsOrBuilder getAdditionsOrBuilder();
+
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ boolean hasRemovals();
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ com.google.webrisk.v1beta1.ThreatEntryRemovals getRemovals();
+ /**
+ *
+ *
+ * + * A set of entries to remove from a local threat type's list. + * This field may be empty. + *+ * + *
.google.cloud.webrisk.v1beta1.ThreatEntryRemovals removals = 6;
+ */
+ com.google.webrisk.v1beta1.ThreatEntryRemovalsOrBuilder getRemovalsOrBuilder();
+
+ /**
+ *
+ *
+ * + * The new opaque client version token. + *+ * + *
bytes new_version_token = 7;
+ */
+ com.google.protobuf.ByteString getNewVersionToken();
+
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ */
+ boolean hasChecksum();
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ */
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum getChecksum();
+ /**
+ *
+ *
+ * + * The expected SHA256 hash of the client state; that is, of the sorted list + * of all hashes present in the database after applying the provided diff. + * If the client state doesn't match the expected state, the client must + * disregard this diff and retry later. + *+ * + *
.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum checksum = 8;
+ */
+ com.google.webrisk.v1beta1.ComputeThreatListDiffResponse.ChecksumOrBuilder getChecksumOrBuilder();
+
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ boolean hasRecommendedNextDiff();
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ com.google.protobuf.Timestamp getRecommendedNextDiff();
+ /**
+ *
+ *
+ * + * The soonest the client should wait before issuing any diff + * request. Querying sooner is unlikely to produce a meaningful diff. + * Waiting longer is acceptable considering the use case. + * If this field is not set clients may update as soon as they want. + *+ * + *
.google.protobuf.Timestamp recommended_next_diff = 2;
+ */
+ com.google.protobuf.TimestampOrBuilder getRecommendedNextDiffOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/RawHashes.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/RawHashes.java
new file mode 100644
index 000000000000..ece2f5696f46
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/RawHashes.java
@@ -0,0 +1,618 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/**
+ *
+ *
+ * + * The uncompressed threat entries in hash format. + * Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 + * bytes, but some hashes are lengthened if they collide with the hash of a + * popular URI. + * Used for sending ThreatEntryAdditons to clients that do not support + * compression, or when sending non-4-byte hashes to clients that do support + * compression. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.RawHashes} + */ +public final class RawHashes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.RawHashes) + RawHashesOrBuilder { + private static final long serialVersionUID = 0L; + // Use RawHashes.newBuilder() to construct. + private RawHashes(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private RawHashes() { + rawHashes_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RawHashes( + 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 8: + { + prefixSize_ = input.readInt32(); + break; + } + case 18: + { + rawHashes_ = input.readBytes(); + 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.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_RawHashes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_RawHashes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.webrisk.v1beta1.RawHashes.class, + com.google.webrisk.v1beta1.RawHashes.Builder.class); + } + + public static final int PREFIX_SIZE_FIELD_NUMBER = 1; + private int prefixSize_; + /** + * + * + *
+ * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + *+ * + *
int32 prefix_size = 1;
+ */
+ public int getPrefixSize() {
+ return prefixSize_;
+ }
+
+ public static final int RAW_HASHES_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString rawHashes_;
+ /**
+ *
+ *
+ * + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + *+ * + *
bytes raw_hashes = 2;
+ */
+ public com.google.protobuf.ByteString getRawHashes() {
+ return rawHashes_;
+ }
+
+ 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 (prefixSize_ != 0) {
+ output.writeInt32(1, prefixSize_);
+ }
+ if (!rawHashes_.isEmpty()) {
+ output.writeBytes(2, rawHashes_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (prefixSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, prefixSize_);
+ }
+ if (!rawHashes_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, rawHashes_);
+ }
+ 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.webrisk.v1beta1.RawHashes)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.RawHashes other = (com.google.webrisk.v1beta1.RawHashes) obj;
+
+ if (getPrefixSize() != other.getPrefixSize()) return false;
+ if (!getRawHashes().equals(other.getRawHashes())) 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) + PREFIX_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPrefixSize();
+ hash = (37 * hash) + RAW_HASHES_FIELD_NUMBER;
+ hash = (53 * hash) + getRawHashes().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes 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.webrisk.v1beta1.RawHashes parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes 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.webrisk.v1beta1.RawHashes parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes 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.webrisk.v1beta1.RawHashes parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes 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.webrisk.v1beta1.RawHashes 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 uncompressed threat entries in hash format. + * Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 + * bytes, but some hashes are lengthened if they collide with the hash of a + * popular URI. + * Used for sending ThreatEntryAdditons to clients that do not support + * compression, or when sending non-4-byte hashes to clients that do support + * compression. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.RawHashes} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + *+ * + *
int32 prefix_size = 1;
+ */
+ public int getPrefixSize() {
+ return prefixSize_;
+ }
+ /**
+ *
+ *
+ * + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + *+ * + *
int32 prefix_size = 1;
+ */
+ public Builder setPrefixSize(int value) {
+
+ prefixSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + *+ * + *
int32 prefix_size = 1;
+ */
+ public Builder clearPrefixSize() {
+
+ prefixSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString rawHashes_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ *
+ * + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + *+ * + *
bytes raw_hashes = 2;
+ */
+ public com.google.protobuf.ByteString getRawHashes() {
+ return rawHashes_;
+ }
+ /**
+ *
+ *
+ * + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + *+ * + *
bytes raw_hashes = 2;
+ */
+ public Builder setRawHashes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ rawHashes_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + *+ * + *
bytes raw_hashes = 2;
+ */
+ public Builder clearRawHashes() {
+
+ rawHashes_ = getDefaultInstance().getRawHashes();
+ 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.webrisk.v1beta1.RawHashes)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.RawHashes)
+ private static final com.google.webrisk.v1beta1.RawHashes DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.RawHashes();
+ }
+
+ public static com.google.webrisk.v1beta1.RawHashes getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The number of bytes for each prefix encoded below. This field can be + * anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + *+ * + *
int32 prefix_size = 1;
+ */
+ int getPrefixSize();
+
+ /**
+ *
+ *
+ * + * The hashes, in binary format, concatenated into one long string. Hashes are + * sorted in lexicographic order. For JSON API users, hashes are + * base64-encoded. + *+ * + *
bytes raw_hashes = 2;
+ */
+ com.google.protobuf.ByteString getRawHashes();
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/RawIndices.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/RawIndices.java
new file mode 100644
index 000000000000..b338fcc4e002
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/RawIndices.java
@@ -0,0 +1,653 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/**
+ *
+ *
+ * + * A set of raw indices to remove from a local list. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.RawIndices} + */ +public final class RawIndices extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.RawIndices) + RawIndicesOrBuilder { + private static final long serialVersionUID = 0L; + // Use RawIndices.newBuilder() to construct. + private RawIndices(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private RawIndices() { + indices_ = emptyIntList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RawIndices( + 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 8: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + indices_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + indices_.addInt(input.readInt32()); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + indices_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + indices_.addInt(input.readInt32()); + } + input.popLimit(limit); + 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)) { + indices_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_RawIndices_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_RawIndices_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.webrisk.v1beta1.RawIndices.class, + com.google.webrisk.v1beta1.RawIndices.Builder.class); + } + + public static final int INDICES_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.IntList indices_; + /** + * + * + *
+ * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public java.util.List+ * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public int getIndicesCount() {
+ return indices_.size();
+ }
+ /**
+ *
+ *
+ * + * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public int getIndices(int index) {
+ return indices_.getInt(index);
+ }
+
+ private int indicesMemoizedSerializedSize = -1;
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ getSerializedSize();
+ if (getIndicesList().size() > 0) {
+ output.writeUInt32NoTag(10);
+ output.writeUInt32NoTag(indicesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < indices_.size(); i++) {
+ output.writeInt32NoTag(indices_.getInt(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 < indices_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(indices_.getInt(i));
+ }
+ size += dataSize;
+ if (!getIndicesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
+ }
+ indicesMemoizedSerializedSize = dataSize;
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.webrisk.v1beta1.RawIndices)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.RawIndices other = (com.google.webrisk.v1beta1.RawIndices) obj;
+
+ if (!getIndicesList().equals(other.getIndicesList())) 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 (getIndicesCount() > 0) {
+ hash = (37 * hash) + INDICES_FIELD_NUMBER;
+ hash = (53 * hash) + getIndicesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices 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.webrisk.v1beta1.RawIndices parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices 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.webrisk.v1beta1.RawIndices parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices 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.webrisk.v1beta1.RawIndices parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices 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.webrisk.v1beta1.RawIndices 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 set of raw indices to remove from a local list. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.RawIndices} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public java.util.List+ * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public int getIndicesCount() {
+ return indices_.size();
+ }
+ /**
+ *
+ *
+ * + * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public int getIndices(int index) {
+ return indices_.getInt(index);
+ }
+ /**
+ *
+ *
+ * + * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public Builder setIndices(int index, int value) {
+ ensureIndicesIsMutable();
+ indices_.setInt(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public Builder addIndices(int value) {
+ ensureIndicesIsMutable();
+ indices_.addInt(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public Builder addAllIndices(java.lang.Iterable extends java.lang.Integer> values) {
+ ensureIndicesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indices_);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ public Builder clearIndices() {
+ indices_ = emptyIntList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ 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.webrisk.v1beta1.RawIndices)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.RawIndices)
+ private static final com.google.webrisk.v1beta1.RawIndices DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.RawIndices();
+ }
+
+ public static com.google.webrisk.v1beta1.RawIndices getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ java.util.List+ * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ int getIndicesCount();
+ /**
+ *
+ *
+ * + * The indices to remove from a lexicographically-sorted local list. + *+ * + *
repeated int32 indices = 1;
+ */
+ int getIndices(int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/RiceDeltaEncoding.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/RiceDeltaEncoding.java
new file mode 100644
index 000000000000..015b0bb8b13f
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/RiceDeltaEncoding.java
@@ -0,0 +1,777 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/**
+ *
+ *
+ * + * The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or + * compressed removal indices. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.RiceDeltaEncoding} + */ +public final class RiceDeltaEncoding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.RiceDeltaEncoding) + RiceDeltaEncodingOrBuilder { + private static final long serialVersionUID = 0L; + // Use RiceDeltaEncoding.newBuilder() to construct. + private RiceDeltaEncoding(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private RiceDeltaEncoding() { + encodedData_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RiceDeltaEncoding( + 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 8: + { + firstValue_ = input.readInt64(); + break; + } + case 16: + { + riceParameter_ = input.readInt32(); + break; + } + case 24: + { + entryCount_ = input.readInt32(); + break; + } + case 34: + { + encodedData_ = input.readBytes(); + 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.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_RiceDeltaEncoding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_RiceDeltaEncoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.webrisk.v1beta1.RiceDeltaEncoding.class, + com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder.class); + } + + public static final int FIRST_VALUE_FIELD_NUMBER = 1; + private long firstValue_; + /** + * + * + *
+ * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + *+ * + *
int64 first_value = 1;
+ */
+ public long getFirstValue() {
+ return firstValue_;
+ }
+
+ public static final int RICE_PARAMETER_FIELD_NUMBER = 2;
+ private int riceParameter_;
+ /**
+ *
+ *
+ * + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + *+ * + *
int32 rice_parameter = 2;
+ */
+ public int getRiceParameter() {
+ return riceParameter_;
+ }
+
+ public static final int ENTRY_COUNT_FIELD_NUMBER = 3;
+ private int entryCount_;
+ /**
+ *
+ *
+ * + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + *+ * + *
int32 entry_count = 3;
+ */
+ public int getEntryCount() {
+ return entryCount_;
+ }
+
+ public static final int ENCODED_DATA_FIELD_NUMBER = 4;
+ private com.google.protobuf.ByteString encodedData_;
+ /**
+ *
+ *
+ * + * The encoded deltas that are encoded using the Golomb-Rice coder. + *+ * + *
bytes encoded_data = 4;
+ */
+ public com.google.protobuf.ByteString getEncodedData() {
+ return encodedData_;
+ }
+
+ 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 (firstValue_ != 0L) {
+ output.writeInt64(1, firstValue_);
+ }
+ if (riceParameter_ != 0) {
+ output.writeInt32(2, riceParameter_);
+ }
+ if (entryCount_ != 0) {
+ output.writeInt32(3, entryCount_);
+ }
+ if (!encodedData_.isEmpty()) {
+ output.writeBytes(4, encodedData_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (firstValue_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, firstValue_);
+ }
+ if (riceParameter_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, riceParameter_);
+ }
+ if (entryCount_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, entryCount_);
+ }
+ if (!encodedData_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, encodedData_);
+ }
+ 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.webrisk.v1beta1.RiceDeltaEncoding)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.RiceDeltaEncoding other =
+ (com.google.webrisk.v1beta1.RiceDeltaEncoding) obj;
+
+ if (getFirstValue() != other.getFirstValue()) return false;
+ if (getRiceParameter() != other.getRiceParameter()) return false;
+ if (getEntryCount() != other.getEntryCount()) return false;
+ if (!getEncodedData().equals(other.getEncodedData())) 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) + FIRST_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFirstValue());
+ hash = (37 * hash) + RICE_PARAMETER_FIELD_NUMBER;
+ hash = (53 * hash) + getRiceParameter();
+ hash = (37 * hash) + ENTRY_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + getEntryCount();
+ hash = (37 * hash) + ENCODED_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getEncodedData().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding 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.webrisk.v1beta1.RiceDeltaEncoding parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding 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.webrisk.v1beta1.RiceDeltaEncoding parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding 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.webrisk.v1beta1.RiceDeltaEncoding parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding 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.webrisk.v1beta1.RiceDeltaEncoding 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 Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or + * compressed removal indices. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.RiceDeltaEncoding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + *+ * + *
int64 first_value = 1;
+ */
+ public long getFirstValue() {
+ return firstValue_;
+ }
+ /**
+ *
+ *
+ * + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + *+ * + *
int64 first_value = 1;
+ */
+ public Builder setFirstValue(long value) {
+
+ firstValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + *+ * + *
int64 first_value = 1;
+ */
+ public Builder clearFirstValue() {
+
+ firstValue_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private int riceParameter_;
+ /**
+ *
+ *
+ * + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + *+ * + *
int32 rice_parameter = 2;
+ */
+ public int getRiceParameter() {
+ return riceParameter_;
+ }
+ /**
+ *
+ *
+ * + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + *+ * + *
int32 rice_parameter = 2;
+ */
+ public Builder setRiceParameter(int value) {
+
+ riceParameter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + *+ * + *
int32 rice_parameter = 2;
+ */
+ public Builder clearRiceParameter() {
+
+ riceParameter_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int entryCount_;
+ /**
+ *
+ *
+ * + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + *+ * + *
int32 entry_count = 3;
+ */
+ public int getEntryCount() {
+ return entryCount_;
+ }
+ /**
+ *
+ *
+ * + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + *+ * + *
int32 entry_count = 3;
+ */
+ public Builder setEntryCount(int value) {
+
+ entryCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + *+ * + *
int32 entry_count = 3;
+ */
+ public Builder clearEntryCount() {
+
+ entryCount_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString encodedData_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ *
+ * + * The encoded deltas that are encoded using the Golomb-Rice coder. + *+ * + *
bytes encoded_data = 4;
+ */
+ public com.google.protobuf.ByteString getEncodedData() {
+ return encodedData_;
+ }
+ /**
+ *
+ *
+ * + * The encoded deltas that are encoded using the Golomb-Rice coder. + *+ * + *
bytes encoded_data = 4;
+ */
+ public Builder setEncodedData(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ encodedData_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The encoded deltas that are encoded using the Golomb-Rice coder. + *+ * + *
bytes encoded_data = 4;
+ */
+ public Builder clearEncodedData() {
+
+ encodedData_ = getDefaultInstance().getEncodedData();
+ 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.webrisk.v1beta1.RiceDeltaEncoding)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.RiceDeltaEncoding)
+ private static final com.google.webrisk.v1beta1.RiceDeltaEncoding DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.RiceDeltaEncoding();
+ }
+
+ public static com.google.webrisk.v1beta1.RiceDeltaEncoding getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The offset of the first entry in the encoded data, or, if only a single + * integer was encoded, that single integer's value. If the field is empty or + * missing, assume zero. + *+ * + *
int64 first_value = 1;
+ */
+ long getFirstValue();
+
+ /**
+ *
+ *
+ * + * The Golomb-Rice parameter, which is a number between 2 and 28. This field + * is missing (that is, zero) if `num_entries` is zero. + *+ * + *
int32 rice_parameter = 2;
+ */
+ int getRiceParameter();
+
+ /**
+ *
+ *
+ * + * The number of entries that are delta encoded in the encoded data. If only a + * single integer was encoded, this will be zero and the single value will be + * stored in `first_value`. + *+ * + *
int32 entry_count = 3;
+ */
+ int getEntryCount();
+
+ /**
+ *
+ *
+ * + * The encoded deltas that are encoded using the Golomb-Rice coder. + *+ * + *
bytes encoded_data = 4;
+ */
+ com.google.protobuf.ByteString getEncodedData();
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchHashesRequest.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchHashesRequest.java
new file mode 100644
index 000000000000..f63873869132
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchHashesRequest.java
@@ -0,0 +1,865 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/**
+ *
+ *
+ * + * Request to return full hashes matched by the provided hash prefixes. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.SearchHashesRequest} + */ +public final class SearchHashesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.SearchHashesRequest) + SearchHashesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchHashesRequest.newBuilder() to construct. + private SearchHashesRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchHashesRequest() { + hashPrefix_ = com.google.protobuf.ByteString.EMPTY; + threatTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchHashesRequest( + 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: + { + hashPrefix_ = input.readBytes(); + break; + } + case 16: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + threatTypes_ = new java.util.ArrayList
+ * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + *+ * + *
bytes hash_prefix = 1;
+ */
+ public com.google.protobuf.ByteString getHashPrefix() {
+ return hashPrefix_;
+ }
+
+ public static final int THREAT_TYPES_FIELD_NUMBER = 2;
+ private java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public int getThreatTypesCount() {
+ return threatTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index) {
+ return threatTypes_converter_.convert(threatTypes_.get(index));
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public int getThreatTypesValue(int index) {
+ return threatTypes_.get(index);
+ }
+
+ private int threatTypesMemoizedSerializedSize;
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ getSerializedSize();
+ if (!hashPrefix_.isEmpty()) {
+ output.writeBytes(1, hashPrefix_);
+ }
+ if (getThreatTypesList().size() > 0) {
+ output.writeUInt32NoTag(18);
+ output.writeUInt32NoTag(threatTypesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < threatTypes_.size(); i++) {
+ output.writeEnumNoTag(threatTypes_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!hashPrefix_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, hashPrefix_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < threatTypes_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(threatTypes_.get(i));
+ }
+ size += dataSize;
+ if (!getThreatTypesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
+ }
+ threatTypesMemoizedSerializedSize = dataSize;
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.webrisk.v1beta1.SearchHashesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.SearchHashesRequest other =
+ (com.google.webrisk.v1beta1.SearchHashesRequest) obj;
+
+ if (!getHashPrefix().equals(other.getHashPrefix())) return false;
+ if (!threatTypes_.equals(other.threatTypes_)) 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) + HASH_PREFIX_FIELD_NUMBER;
+ hash = (53 * hash) + getHashPrefix().hashCode();
+ if (getThreatTypesCount() > 0) {
+ hash = (37 * hash) + THREAT_TYPES_FIELD_NUMBER;
+ hash = (53 * hash) + threatTypes_.hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesRequest 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.webrisk.v1beta1.SearchHashesRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesRequest 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.webrisk.v1beta1.SearchHashesRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesRequest 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.webrisk.v1beta1.SearchHashesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesRequest 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.webrisk.v1beta1.SearchHashesRequest 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;
+ }
+ /**
+ *
+ *
+ * + * Request to return full hashes matched by the provided hash prefixes. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.SearchHashesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + *+ * + *
bytes hash_prefix = 1;
+ */
+ public com.google.protobuf.ByteString getHashPrefix() {
+ return hashPrefix_;
+ }
+ /**
+ *
+ *
+ * + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + *+ * + *
bytes hash_prefix = 1;
+ */
+ public Builder setHashPrefix(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ hashPrefix_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + *+ * + *
bytes hash_prefix = 1;
+ */
+ public Builder clearHashPrefix() {
+
+ hashPrefix_ = getDefaultInstance().getHashPrefix();
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public int getThreatTypesCount() {
+ return threatTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index) {
+ return threatTypes_converter_.convert(threatTypes_.get(index));
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder setThreatTypes(int index, com.google.webrisk.v1beta1.ThreatType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatTypesIsMutable();
+ threatTypes_.set(index, value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder addThreatTypes(com.google.webrisk.v1beta1.ThreatType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatTypesIsMutable();
+ threatTypes_.add(value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder addAllThreatTypes(
+ java.lang.Iterable extends com.google.webrisk.v1beta1.ThreatType> values) {
+ ensureThreatTypesIsMutable();
+ for (com.google.webrisk.v1beta1.ThreatType value : values) {
+ threatTypes_.add(value.getNumber());
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder clearThreatTypes() {
+ threatTypes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public int getThreatTypesValue(int index) {
+ return threatTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder setThreatTypesValue(int index, int value) {
+ ensureThreatTypesIsMutable();
+ threatTypes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder addThreatTypesValue(int value) {
+ ensureThreatTypesIsMutable();
+ threatTypes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder addAllThreatTypesValue(java.lang.Iterable+ * A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + * hash. For JSON requests, this field is base64-encoded. + *+ * + *
bytes hash_prefix = 1;
+ */
+ com.google.protobuf.ByteString getHashPrefix();
+
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ int getThreatTypesCount();
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index);
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ int getThreatTypesValue(int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchHashesResponse.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchHashesResponse.java
new file mode 100644
index 000000000000..e9cb0397d2b4
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchHashesResponse.java
@@ -0,0 +1,2526 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/** Protobuf type {@code google.cloud.webrisk.v1beta1.SearchHashesResponse} */
+public final class SearchHashesResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.SearchHashesResponse)
+ SearchHashesResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use SearchHashesResponse.newBuilder() to construct.
+ private SearchHashesResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchHashesResponse() {
+ threats_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private SearchHashesResponse(
+ 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)) {
+ threats_ =
+ new java.util.ArrayList<
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash>();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ threats_.add(
+ input.readMessage(
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash.parser(),
+ extensionRegistry));
+ break;
+ }
+ case 18:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (negativeExpireTime_ != null) {
+ subBuilder = negativeExpireTime_.toBuilder();
+ }
+ negativeExpireTime_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(negativeExpireTime_);
+ negativeExpireTime_ = 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 {
+ if (((mutable_bitField0_ & 0x00000001) != 0)) {
+ threats_ = java.util.Collections.unmodifiableList(threats_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.webrisk.v1beta1.WebRiskProto
+ .internal_static_google_cloud_webrisk_v1beta1_SearchHashesResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.webrisk.v1beta1.WebRiskProto
+ .internal_static_google_cloud_webrisk_v1beta1_SearchHashesResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.webrisk.v1beta1.SearchHashesResponse.class,
+ com.google.webrisk.v1beta1.SearchHashesResponse.Builder.class);
+ }
+
+ public interface ThreatHashOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ java.util.List+ * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ int getThreatTypesCount();
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index);
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ java.util.List+ * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ int getThreatTypesValue(int index);
+
+ /**
+ *
+ *
+ * + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + *+ * + *
bytes hash = 2;
+ */
+ com.google.protobuf.ByteString getHash();
+
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ boolean hasExpireTime();
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ com.google.protobuf.Timestamp getExpireTime();
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder();
+ }
+ /**
+ *
+ *
+ * + * Contains threat information on a matching hash. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} + */ + public static final class ThreatHash extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash) + ThreatHashOrBuilder { + private static final long serialVersionUID = 0L; + // Use ThreatHash.newBuilder() to construct. + private ThreatHash(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ThreatHash() { + threatTypes_ = java.util.Collections.emptyList(); + hash_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ThreatHash( + 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 8: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + threatTypes_ = new java.util.ArrayList
+ * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public java.util.List+ * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public int getThreatTypesCount() {
+ return threatTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index) {
+ return threatTypes_converter_.convert(threatTypes_.get(index));
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public java.util.List+ * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public int getThreatTypesValue(int index) {
+ return threatTypes_.get(index);
+ }
+
+ private int threatTypesMemoizedSerializedSize;
+
+ public static final int HASH_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString hash_;
+ /**
+ *
+ *
+ * + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + *+ * + *
bytes hash = 2;
+ */
+ public com.google.protobuf.ByteString getHash() {
+ return hash_;
+ }
+
+ public static final int EXPIRE_TIME_FIELD_NUMBER = 3;
+ private com.google.protobuf.Timestamp expireTime_;
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public boolean hasExpireTime() {
+ return expireTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public com.google.protobuf.Timestamp getExpireTime() {
+ return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
+ return getExpireTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ getSerializedSize();
+ if (getThreatTypesList().size() > 0) {
+ output.writeUInt32NoTag(10);
+ output.writeUInt32NoTag(threatTypesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < threatTypes_.size(); i++) {
+ output.writeEnumNoTag(threatTypes_.get(i));
+ }
+ if (!hash_.isEmpty()) {
+ output.writeBytes(2, hash_);
+ }
+ if (expireTime_ != null) {
+ output.writeMessage(3, getExpireTime());
+ }
+ 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 < threatTypes_.size(); i++) {
+ dataSize +=
+ com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(threatTypes_.get(i));
+ }
+ size += dataSize;
+ if (!getThreatTypesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
+ }
+ threatTypesMemoizedSerializedSize = dataSize;
+ }
+ if (!hash_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, hash_);
+ }
+ if (expireTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExpireTime());
+ }
+ 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.webrisk.v1beta1.SearchHashesResponse.ThreatHash)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash other =
+ (com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash) obj;
+
+ if (!threatTypes_.equals(other.threatTypes_)) return false;
+ if (!getHash().equals(other.getHash())) return false;
+ if (hasExpireTime() != other.hasExpireTime()) return false;
+ if (hasExpireTime()) {
+ if (!getExpireTime().equals(other.getExpireTime())) 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 (getThreatTypesCount() > 0) {
+ hash = (37 * hash) + THREAT_TYPES_FIELD_NUMBER;
+ hash = (53 * hash) + threatTypes_.hashCode();
+ }
+ hash = (37 * hash) + HASH_FIELD_NUMBER;
+ hash = (53 * hash) + getHash().hashCode();
+ if (hasExpireTime()) {
+ hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getExpireTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash 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.webrisk.v1beta1.SearchHashesResponse.ThreatHash parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash 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.webrisk.v1beta1.SearchHashesResponse.ThreatHash parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash 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.webrisk.v1beta1.SearchHashesResponse.ThreatHash parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash 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.webrisk.v1beta1.SearchHashesResponse.ThreatHash 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;
+ }
+ /**
+ *
+ *
+ * + * Contains threat information on a matching hash. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public java.util.List+ * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public int getThreatTypesCount() {
+ return threatTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index) {
+ return threatTypes_converter_.convert(threatTypes_.get(index));
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder setThreatTypes(int index, com.google.webrisk.v1beta1.ThreatType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatTypesIsMutable();
+ threatTypes_.set(index, value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder addThreatTypes(com.google.webrisk.v1beta1.ThreatType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatTypesIsMutable();
+ threatTypes_.add(value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder addAllThreatTypes(
+ java.lang.Iterable extends com.google.webrisk.v1beta1.ThreatType> values) {
+ ensureThreatTypesIsMutable();
+ for (com.google.webrisk.v1beta1.ThreatType value : values) {
+ threatTypes_.add(value.getNumber());
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder clearThreatTypes() {
+ threatTypes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public java.util.List+ * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public int getThreatTypesValue(int index) {
+ return threatTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder setThreatTypesValue(int index, int value) {
+ ensureThreatTypesIsMutable();
+ threatTypes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder addThreatTypesValue(int value) {
+ ensureThreatTypesIsMutable();
+ threatTypes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + * This must contain at least one entry. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder addAllThreatTypesValue(java.lang.Iterable+ * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + *+ * + *
bytes hash = 2;
+ */
+ public com.google.protobuf.ByteString getHash() {
+ return hash_;
+ }
+ /**
+ *
+ *
+ * + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + *+ * + *
bytes hash = 2;
+ */
+ public Builder setHash(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ hash_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A 32 byte SHA256 hash. This field is in binary format. For JSON + * requests, hashes are base64-encoded. + *+ * + *
bytes hash = 2;
+ */
+ public Builder clearHash() {
+
+ hash_ = getDefaultInstance().getHash();
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp expireTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ expireTimeBuilder_;
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public boolean hasExpireTime() {
+ return expireTimeBuilder_ != null || expireTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public com.google.protobuf.Timestamp getExpireTime() {
+ if (expireTimeBuilder_ == null) {
+ return expireTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : expireTime_;
+ } else {
+ return expireTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public Builder setExpireTime(com.google.protobuf.Timestamp value) {
+ if (expireTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ expireTime_ = value;
+ onChanged();
+ } else {
+ expireTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (expireTimeBuilder_ == null) {
+ expireTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ expireTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
+ if (expireTimeBuilder_ == null) {
+ if (expireTime_ != null) {
+ expireTime_ =
+ com.google.protobuf.Timestamp.newBuilder(expireTime_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ expireTime_ = value;
+ }
+ onChanged();
+ } else {
+ expireTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public Builder clearExpireTime() {
+ if (expireTimeBuilder_ == null) {
+ expireTime_ = null;
+ onChanged();
+ } else {
+ expireTime_ = null;
+ expireTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
+
+ onChanged();
+ return getExpireTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
+ if (expireTimeBuilder_ != null) {
+ return expireTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return expireTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : expireTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getExpireTimeFieldBuilder() {
+ if (expireTimeBuilder_ == null) {
+ expireTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getExpireTime(), getParentForChildren(), isClean());
+ expireTime_ = null;
+ }
+ return expireTimeBuilder_;
+ }
+
+ @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.webrisk.v1beta1.SearchHashesResponse.ThreatHash)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash)
+ private static final com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash();
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public java.util.List+ * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public java.util.List<
+ ? extends com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHashOrBuilder>
+ getThreatsOrBuilderList() {
+ return threats_;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public int getThreatsCount() {
+ return threats_.size();
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash getThreats(int index) {
+ return threats_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHashOrBuilder getThreatsOrBuilder(
+ int index) {
+ return threats_.get(index);
+ }
+
+ public static final int NEGATIVE_EXPIRE_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp negativeExpireTime_;
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public boolean hasNegativeExpireTime() {
+ return negativeExpireTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public com.google.protobuf.Timestamp getNegativeExpireTime() {
+ return negativeExpireTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : negativeExpireTime_;
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getNegativeExpireTimeOrBuilder() {
+ return getNegativeExpireTime();
+ }
+
+ 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 < threats_.size(); i++) {
+ output.writeMessage(1, threats_.get(i));
+ }
+ if (negativeExpireTime_ != null) {
+ output.writeMessage(2, getNegativeExpireTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < threats_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, threats_.get(i));
+ }
+ if (negativeExpireTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNegativeExpireTime());
+ }
+ 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.webrisk.v1beta1.SearchHashesResponse)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.SearchHashesResponse other =
+ (com.google.webrisk.v1beta1.SearchHashesResponse) obj;
+
+ if (!getThreatsList().equals(other.getThreatsList())) return false;
+ if (hasNegativeExpireTime() != other.hasNegativeExpireTime()) return false;
+ if (hasNegativeExpireTime()) {
+ if (!getNegativeExpireTime().equals(other.getNegativeExpireTime())) 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 (getThreatsCount() > 0) {
+ hash = (37 * hash) + THREATS_FIELD_NUMBER;
+ hash = (53 * hash) + getThreatsList().hashCode();
+ }
+ if (hasNegativeExpireTime()) {
+ hash = (37 * hash) + NEGATIVE_EXPIRE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getNegativeExpireTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse 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.webrisk.v1beta1.SearchHashesResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse 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.webrisk.v1beta1.SearchHashesResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse 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.webrisk.v1beta1.SearchHashesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse 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.webrisk.v1beta1.SearchHashesResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /** Protobuf type {@code google.cloud.webrisk.v1beta1.SearchHashesResponse} */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder+ * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public java.util.List+ * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public int getThreatsCount() {
+ if (threatsBuilder_ == null) {
+ return threats_.size();
+ } else {
+ return threatsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash getThreats(int index) {
+ if (threatsBuilder_ == null) {
+ return threats_.get(index);
+ } else {
+ return threatsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public Builder setThreats(
+ int index, com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash value) {
+ if (threatsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatsIsMutable();
+ threats_.set(index, value);
+ onChanged();
+ } else {
+ threatsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public Builder setThreats(
+ int index,
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash.Builder builderForValue) {
+ if (threatsBuilder_ == null) {
+ ensureThreatsIsMutable();
+ threats_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ threatsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public Builder addThreats(com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash value) {
+ if (threatsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatsIsMutable();
+ threats_.add(value);
+ onChanged();
+ } else {
+ threatsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public Builder addThreats(
+ int index, com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash value) {
+ if (threatsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatsIsMutable();
+ threats_.add(index, value);
+ onChanged();
+ } else {
+ threatsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public Builder addThreats(
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash.Builder builderForValue) {
+ if (threatsBuilder_ == null) {
+ ensureThreatsIsMutable();
+ threats_.add(builderForValue.build());
+ onChanged();
+ } else {
+ threatsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public Builder addThreats(
+ int index,
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash.Builder builderForValue) {
+ if (threatsBuilder_ == null) {
+ ensureThreatsIsMutable();
+ threats_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ threatsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public Builder addAllThreats(
+ java.lang.Iterable extends com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash>
+ values) {
+ if (threatsBuilder_ == null) {
+ ensureThreatsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, threats_);
+ onChanged();
+ } else {
+ threatsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public Builder clearThreats() {
+ if (threatsBuilder_ == null) {
+ threats_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ threatsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public Builder removeThreats(int index) {
+ if (threatsBuilder_ == null) {
+ ensureThreatsIsMutable();
+ threats_.remove(index);
+ onChanged();
+ } else {
+ threatsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash.Builder getThreatsBuilder(
+ int index) {
+ return getThreatsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHashOrBuilder getThreatsOrBuilder(
+ int index) {
+ if (threatsBuilder_ == null) {
+ return threats_.get(index);
+ } else {
+ return threatsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public java.util.List<
+ ? extends com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHashOrBuilder>
+ getThreatsOrBuilderList() {
+ if (threatsBuilder_ != null) {
+ return threatsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(threats_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash.Builder addThreatsBuilder() {
+ return getThreatsFieldBuilder()
+ .addBuilder(
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash.Builder addThreatsBuilder(
+ int index) {
+ return getThreatsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ public java.util.List+ * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public boolean hasNegativeExpireTime() {
+ return negativeExpireTimeBuilder_ != null || negativeExpireTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public com.google.protobuf.Timestamp getNegativeExpireTime() {
+ if (negativeExpireTimeBuilder_ == null) {
+ return negativeExpireTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : negativeExpireTime_;
+ } else {
+ return negativeExpireTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public Builder setNegativeExpireTime(com.google.protobuf.Timestamp value) {
+ if (negativeExpireTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ negativeExpireTime_ = value;
+ onChanged();
+ } else {
+ negativeExpireTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public Builder setNegativeExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (negativeExpireTimeBuilder_ == null) {
+ negativeExpireTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ negativeExpireTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public Builder mergeNegativeExpireTime(com.google.protobuf.Timestamp value) {
+ if (negativeExpireTimeBuilder_ == null) {
+ if (negativeExpireTime_ != null) {
+ negativeExpireTime_ =
+ com.google.protobuf.Timestamp.newBuilder(negativeExpireTime_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ negativeExpireTime_ = value;
+ }
+ onChanged();
+ } else {
+ negativeExpireTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public Builder clearNegativeExpireTime() {
+ if (negativeExpireTimeBuilder_ == null) {
+ negativeExpireTime_ = null;
+ onChanged();
+ } else {
+ negativeExpireTime_ = null;
+ negativeExpireTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getNegativeExpireTimeBuilder() {
+
+ onChanged();
+ return getNegativeExpireTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getNegativeExpireTimeOrBuilder() {
+ if (negativeExpireTimeBuilder_ != null) {
+ return negativeExpireTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return negativeExpireTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : negativeExpireTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getNegativeExpireTimeFieldBuilder() {
+ if (negativeExpireTimeBuilder_ == null) {
+ negativeExpireTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getNegativeExpireTime(), getParentForChildren(), isClean());
+ negativeExpireTime_ = null;
+ }
+ return negativeExpireTimeBuilder_;
+ }
+
+ @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.webrisk.v1beta1.SearchHashesResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.SearchHashesResponse)
+ private static final com.google.webrisk.v1beta1.SearchHashesResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.SearchHashesResponse();
+ }
+
+ public static com.google.webrisk.v1beta1.SearchHashesResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ java.util.List+ * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHash getThreats(int index);
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ int getThreatsCount();
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ java.util.List extends com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHashOrBuilder>
+ getThreatsOrBuilderList();
+ /**
+ *
+ *
+ * + * The full hashes that matched the requested prefixes. + * The hash will be populated in the key. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash threats = 1;
+ *
+ */
+ com.google.webrisk.v1beta1.SearchHashesResponse.ThreatHashOrBuilder getThreatsOrBuilder(
+ int index);
+
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ boolean hasNegativeExpireTime();
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ com.google.protobuf.Timestamp getNegativeExpireTime();
+ /**
+ *
+ *
+ * + * For requested entities that did not match the threat list, how long to + * cache the response until. + *+ * + *
.google.protobuf.Timestamp negative_expire_time = 2;
+ */
+ com.google.protobuf.TimestampOrBuilder getNegativeExpireTimeOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchUrisRequest.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchUrisRequest.java
new file mode 100644
index 000000000000..c0482228c00f
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchUrisRequest.java
@@ -0,0 +1,939 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/**
+ *
+ *
+ * + * Request to check URI entries against threatLists. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.SearchUrisRequest} + */ +public final class SearchUrisRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.SearchUrisRequest) + SearchUrisRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchUrisRequest.newBuilder() to construct. + private SearchUrisRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchUrisRequest() { + uri_ = ""; + threatTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchUrisRequest( + 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(); + + uri_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + threatTypes_ = new java.util.ArrayList
+ * The URI to be checked for matches. + *+ * + *
string uri = 1;
+ */
+ public java.lang.String getUri() {
+ java.lang.Object ref = uri_;
+ 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();
+ uri_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The URI to be checked for matches. + *+ * + *
string uri = 1;
+ */
+ public com.google.protobuf.ByteString getUriBytes() {
+ java.lang.Object ref = uri_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ uri_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int THREAT_TYPES_FIELD_NUMBER = 2;
+ private java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public int getThreatTypesCount() {
+ return threatTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index) {
+ return threatTypes_converter_.convert(threatTypes_.get(index));
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public int getThreatTypesValue(int index) {
+ return threatTypes_.get(index);
+ }
+
+ private int threatTypesMemoizedSerializedSize;
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ getSerializedSize();
+ if (!getUriBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_);
+ }
+ if (getThreatTypesList().size() > 0) {
+ output.writeUInt32NoTag(18);
+ output.writeUInt32NoTag(threatTypesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < threatTypes_.size(); i++) {
+ output.writeEnumNoTag(threatTypes_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getUriBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < threatTypes_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(threatTypes_.get(i));
+ }
+ size += dataSize;
+ if (!getThreatTypesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
+ }
+ threatTypesMemoizedSerializedSize = dataSize;
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.webrisk.v1beta1.SearchUrisRequest)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.SearchUrisRequest other =
+ (com.google.webrisk.v1beta1.SearchUrisRequest) obj;
+
+ if (!getUri().equals(other.getUri())) return false;
+ if (!threatTypes_.equals(other.threatTypes_)) 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) + URI_FIELD_NUMBER;
+ hash = (53 * hash) + getUri().hashCode();
+ if (getThreatTypesCount() > 0) {
+ hash = (37 * hash) + THREAT_TYPES_FIELD_NUMBER;
+ hash = (53 * hash) + threatTypes_.hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisRequest 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.webrisk.v1beta1.SearchUrisRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisRequest 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.webrisk.v1beta1.SearchUrisRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisRequest 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.webrisk.v1beta1.SearchUrisRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisRequest 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.webrisk.v1beta1.SearchUrisRequest 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;
+ }
+ /**
+ *
+ *
+ * + * Request to check URI entries against threatLists. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.SearchUrisRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The URI to be checked for matches. + *+ * + *
string uri = 1;
+ */
+ public java.lang.String getUri() {
+ java.lang.Object ref = uri_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ uri_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The URI to be checked for matches. + *+ * + *
string uri = 1;
+ */
+ public com.google.protobuf.ByteString getUriBytes() {
+ java.lang.Object ref = uri_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ uri_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The URI to be checked for matches. + *+ * + *
string uri = 1;
+ */
+ public Builder setUri(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ uri_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The URI to be checked for matches. + *+ * + *
string uri = 1;
+ */
+ public Builder clearUri() {
+
+ uri_ = getDefaultInstance().getUri();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The URI to be checked for matches. + *+ * + *
string uri = 1;
+ */
+ public Builder setUriBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ uri_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public int getThreatTypesCount() {
+ return threatTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index) {
+ return threatTypes_converter_.convert(threatTypes_.get(index));
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder setThreatTypes(int index, com.google.webrisk.v1beta1.ThreatType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatTypesIsMutable();
+ threatTypes_.set(index, value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder addThreatTypes(com.google.webrisk.v1beta1.ThreatType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatTypesIsMutable();
+ threatTypes_.add(value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder addAllThreatTypes(
+ java.lang.Iterable extends com.google.webrisk.v1beta1.ThreatType> values) {
+ ensureThreatTypesIsMutable();
+ for (com.google.webrisk.v1beta1.ThreatType value : values) {
+ threatTypes_.add(value.getNumber());
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder clearThreatTypes() {
+ threatTypes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public int getThreatTypesValue(int index) {
+ return threatTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder setThreatTypesValue(int index, int value) {
+ ensureThreatTypesIsMutable();
+ threatTypes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder addThreatTypesValue(int value) {
+ ensureThreatTypesIsMutable();
+ threatTypes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ public Builder addAllThreatTypesValue(java.lang.Iterable+ * The URI to be checked for matches. + *+ * + *
string uri = 1;
+ */
+ java.lang.String getUri();
+ /**
+ *
+ *
+ * + * The URI to be checked for matches. + *+ * + *
string uri = 1;
+ */
+ com.google.protobuf.ByteString getUriBytes();
+
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ int getThreatTypesCount();
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index);
+ /**
+ *
+ *
+ * + * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ java.util.List+ * Required. The ThreatLists to search in. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 2;
+ */
+ int getThreatTypesValue(int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchUrisResponse.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchUrisResponse.java
new file mode 100644
index 000000000000..f4f5b8db3ee9
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/SearchUrisResponse.java
@@ -0,0 +1,1834 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/** Protobuf type {@code google.cloud.webrisk.v1beta1.SearchUrisResponse} */
+public final class SearchUrisResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.SearchUrisResponse)
+ SearchUrisResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use SearchUrisResponse.newBuilder() to construct.
+ private SearchUrisResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchUrisResponse() {}
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private SearchUrisResponse(
+ 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.webrisk.v1beta1.SearchUrisResponse.ThreatUri.Builder subBuilder = null;
+ if (threat_ != null) {
+ subBuilder = threat_.toBuilder();
+ }
+ threat_ =
+ input.readMessage(
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(threat_);
+ threat_ = 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.webrisk.v1beta1.WebRiskProto
+ .internal_static_google_cloud_webrisk_v1beta1_SearchUrisResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.webrisk.v1beta1.WebRiskProto
+ .internal_static_google_cloud_webrisk_v1beta1_SearchUrisResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.webrisk.v1beta1.SearchUrisResponse.class,
+ com.google.webrisk.v1beta1.SearchUrisResponse.Builder.class);
+ }
+
+ public interface ThreatUriOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ java.util.List+ * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ int getThreatTypesCount();
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index);
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ java.util.List+ * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ int getThreatTypesValue(int index);
+
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ boolean hasExpireTime();
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ com.google.protobuf.Timestamp getExpireTime();
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder();
+ }
+ /**
+ *
+ *
+ * + * Contains threat information on a matching uri. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} + */ + public static final class ThreatUri extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri) + ThreatUriOrBuilder { + private static final long serialVersionUID = 0L; + // Use ThreatUri.newBuilder() to construct. + private ThreatUri(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ThreatUri() { + threatTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ThreatUri( + 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 8: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + threatTypes_ = new java.util.ArrayList
+ * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public java.util.List+ * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public int getThreatTypesCount() {
+ return threatTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index) {
+ return threatTypes_converter_.convert(threatTypes_.get(index));
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public java.util.List+ * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public int getThreatTypesValue(int index) {
+ return threatTypes_.get(index);
+ }
+
+ private int threatTypesMemoizedSerializedSize;
+
+ public static final int EXPIRE_TIME_FIELD_NUMBER = 2;
+ private com.google.protobuf.Timestamp expireTime_;
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public boolean hasExpireTime() {
+ return expireTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.Timestamp getExpireTime() {
+ return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
+ return getExpireTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ getSerializedSize();
+ if (getThreatTypesList().size() > 0) {
+ output.writeUInt32NoTag(10);
+ output.writeUInt32NoTag(threatTypesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < threatTypes_.size(); i++) {
+ output.writeEnumNoTag(threatTypes_.get(i));
+ }
+ if (expireTime_ != null) {
+ output.writeMessage(2, getExpireTime());
+ }
+ 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 < threatTypes_.size(); i++) {
+ dataSize +=
+ com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(threatTypes_.get(i));
+ }
+ size += dataSize;
+ if (!getThreatTypesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
+ }
+ threatTypesMemoizedSerializedSize = dataSize;
+ }
+ if (expireTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExpireTime());
+ }
+ 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.webrisk.v1beta1.SearchUrisResponse.ThreatUri)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri other =
+ (com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri) obj;
+
+ if (!threatTypes_.equals(other.threatTypes_)) return false;
+ if (hasExpireTime() != other.hasExpireTime()) return false;
+ if (hasExpireTime()) {
+ if (!getExpireTime().equals(other.getExpireTime())) 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 (getThreatTypesCount() > 0) {
+ hash = (37 * hash) + THREAT_TYPES_FIELD_NUMBER;
+ hash = (53 * hash) + threatTypes_.hashCode();
+ }
+ if (hasExpireTime()) {
+ hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getExpireTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri 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.webrisk.v1beta1.SearchUrisResponse.ThreatUri parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri 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.webrisk.v1beta1.SearchUrisResponse.ThreatUri parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri 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.webrisk.v1beta1.SearchUrisResponse.ThreatUri parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri 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.webrisk.v1beta1.SearchUrisResponse.ThreatUri 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;
+ }
+ /**
+ *
+ *
+ * + * Contains threat information on a matching uri. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public java.util.List+ * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public int getThreatTypesCount() {
+ return threatTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public com.google.webrisk.v1beta1.ThreatType getThreatTypes(int index) {
+ return threatTypes_converter_.convert(threatTypes_.get(index));
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder setThreatTypes(int index, com.google.webrisk.v1beta1.ThreatType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatTypesIsMutable();
+ threatTypes_.set(index, value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder addThreatTypes(com.google.webrisk.v1beta1.ThreatType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureThreatTypesIsMutable();
+ threatTypes_.add(value.getNumber());
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder addAllThreatTypes(
+ java.lang.Iterable extends com.google.webrisk.v1beta1.ThreatType> values) {
+ ensureThreatTypesIsMutable();
+ for (com.google.webrisk.v1beta1.ThreatType value : values) {
+ threatTypes_.add(value.getNumber());
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder clearThreatTypes() {
+ threatTypes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public java.util.List+ * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public int getThreatTypesValue(int index) {
+ return threatTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder setThreatTypesValue(int index, int value) {
+ ensureThreatTypesIsMutable();
+ threatTypes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder addThreatTypesValue(int value) {
+ ensureThreatTypesIsMutable();
+ threatTypes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The ThreatList this threat belongs to. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;
+ */
+ public Builder addAllThreatTypesValue(java.lang.Iterable+ * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public boolean hasExpireTime() {
+ return expireTimeBuilder_ != null || expireTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.Timestamp getExpireTime() {
+ if (expireTimeBuilder_ == null) {
+ return expireTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : expireTime_;
+ } else {
+ return expireTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public Builder setExpireTime(com.google.protobuf.Timestamp value) {
+ if (expireTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ expireTime_ = value;
+ onChanged();
+ } else {
+ expireTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (expireTimeBuilder_ == null) {
+ expireTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ expireTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
+ if (expireTimeBuilder_ == null) {
+ if (expireTime_ != null) {
+ expireTime_ =
+ com.google.protobuf.Timestamp.newBuilder(expireTime_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ expireTime_ = value;
+ }
+ onChanged();
+ } else {
+ expireTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public Builder clearExpireTime() {
+ if (expireTimeBuilder_ == null) {
+ expireTime_ = null;
+ onChanged();
+ } else {
+ expireTime_ = null;
+ expireTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
+
+ onChanged();
+ return getExpireTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
+ if (expireTimeBuilder_ != null) {
+ return expireTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return expireTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : expireTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The cache lifetime for the returned match. Clients must not cache this + * response past this timestamp to avoid false positives. + *+ * + *
.google.protobuf.Timestamp expire_time = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getExpireTimeFieldBuilder() {
+ if (expireTimeBuilder_ == null) {
+ expireTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getExpireTime(), getParentForChildren(), isClean());
+ expireTime_ = null;
+ }
+ return expireTimeBuilder_;
+ }
+
+ @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.webrisk.v1beta1.SearchUrisResponse.ThreatUri)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri)
+ private static final com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri();
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public boolean hasThreat() {
+ return threat_ != null;
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri getThreat() {
+ return threat_ == null
+ ? com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri.getDefaultInstance()
+ : threat_;
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUriOrBuilder getThreatOrBuilder() {
+ return getThreat();
+ }
+
+ 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 (threat_ != null) {
+ output.writeMessage(1, getThreat());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (threat_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getThreat());
+ }
+ 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.webrisk.v1beta1.SearchUrisResponse)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.SearchUrisResponse other =
+ (com.google.webrisk.v1beta1.SearchUrisResponse) obj;
+
+ if (hasThreat() != other.hasThreat()) return false;
+ if (hasThreat()) {
+ if (!getThreat().equals(other.getThreat())) 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 (hasThreat()) {
+ hash = (37 * hash) + THREAT_FIELD_NUMBER;
+ hash = (53 * hash) + getThreat().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse 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.webrisk.v1beta1.SearchUrisResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse 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.webrisk.v1beta1.SearchUrisResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse 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.webrisk.v1beta1.SearchUrisResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse 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.webrisk.v1beta1.SearchUrisResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /** Protobuf type {@code google.cloud.webrisk.v1beta1.SearchUrisResponse} */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder+ * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public boolean hasThreat() {
+ return threatBuilder_ != null || threat_ != null;
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri getThreat() {
+ if (threatBuilder_ == null) {
+ return threat_ == null
+ ? com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri.getDefaultInstance()
+ : threat_;
+ } else {
+ return threatBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public Builder setThreat(com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri value) {
+ if (threatBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ threat_ = value;
+ onChanged();
+ } else {
+ threatBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public Builder setThreat(
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri.Builder builderForValue) {
+ if (threatBuilder_ == null) {
+ threat_ = builderForValue.build();
+ onChanged();
+ } else {
+ threatBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public Builder mergeThreat(com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri value) {
+ if (threatBuilder_ == null) {
+ if (threat_ != null) {
+ threat_ =
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri.newBuilder(threat_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ threat_ = value;
+ }
+ onChanged();
+ } else {
+ threatBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public Builder clearThreat() {
+ if (threatBuilder_ == null) {
+ threat_ = null;
+ onChanged();
+ } else {
+ threat_ = null;
+ threatBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri.Builder getThreatBuilder() {
+
+ onChanged();
+ return getThreatFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ public com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUriOrBuilder getThreatOrBuilder() {
+ if (threatBuilder_ != null) {
+ return threatBuilder_.getMessageOrBuilder();
+ } else {
+ return threat_ == null
+ ? com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri.getDefaultInstance()
+ : threat_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri,
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri.Builder,
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUriOrBuilder>
+ getThreatFieldBuilder() {
+ if (threatBuilder_ == null) {
+ threatBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri,
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri.Builder,
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUriOrBuilder>(
+ getThreat(), getParentForChildren(), isClean());
+ threat_ = null;
+ }
+ return threatBuilder_;
+ }
+
+ @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.webrisk.v1beta1.SearchUrisResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.SearchUrisResponse)
+ private static final com.google.webrisk.v1beta1.SearchUrisResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.SearchUrisResponse();
+ }
+
+ public static com.google.webrisk.v1beta1.SearchUrisResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ boolean hasThreat();
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUri getThreat();
+ /**
+ *
+ *
+ * + * The threat list matches. This may be empty if the URI is on no list. + *+ * + *
.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri threat = 1;
+ */
+ com.google.webrisk.v1beta1.SearchUrisResponse.ThreatUriOrBuilder getThreatOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ThreatEntryAdditions.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ThreatEntryAdditions.java
new file mode 100644
index 000000000000..fcd8c1c673a8
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ThreatEntryAdditions.java
@@ -0,0 +1,1240 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/**
+ *
+ *
+ * + * Contains the set of entries to add to a local database. + * May contain a combination of compressed and raw data in a single response. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ThreatEntryAdditions} + */ +public final class ThreatEntryAdditions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.ThreatEntryAdditions) + ThreatEntryAdditionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ThreatEntryAdditions.newBuilder() to construct. + private ThreatEntryAdditions(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ThreatEntryAdditions() { + rawHashes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ThreatEntryAdditions( + 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)) { + rawHashes_ = new java.util.ArrayList
+ * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public java.util.List+ * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public java.util.List extends com.google.webrisk.v1beta1.RawHashesOrBuilder>
+ getRawHashesOrBuilderList() {
+ return rawHashes_;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public int getRawHashesCount() {
+ return rawHashes_.size();
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public com.google.webrisk.v1beta1.RawHashes getRawHashes(int index) {
+ return rawHashes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public com.google.webrisk.v1beta1.RawHashesOrBuilder getRawHashesOrBuilder(int index) {
+ return rawHashes_.get(index);
+ }
+
+ public static final int RICE_HASHES_FIELD_NUMBER = 2;
+ private com.google.webrisk.v1beta1.RiceDeltaEncoding riceHashes_;
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public boolean hasRiceHashes() {
+ return riceHashes_ != null;
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncoding getRiceHashes() {
+ return riceHashes_ == null
+ ? com.google.webrisk.v1beta1.RiceDeltaEncoding.getDefaultInstance()
+ : riceHashes_;
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder getRiceHashesOrBuilder() {
+ return getRiceHashes();
+ }
+
+ 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 < rawHashes_.size(); i++) {
+ output.writeMessage(1, rawHashes_.get(i));
+ }
+ if (riceHashes_ != null) {
+ output.writeMessage(2, getRiceHashes());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < rawHashes_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rawHashes_.get(i));
+ }
+ if (riceHashes_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRiceHashes());
+ }
+ 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.webrisk.v1beta1.ThreatEntryAdditions)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.ThreatEntryAdditions other =
+ (com.google.webrisk.v1beta1.ThreatEntryAdditions) obj;
+
+ if (!getRawHashesList().equals(other.getRawHashesList())) return false;
+ if (hasRiceHashes() != other.hasRiceHashes()) return false;
+ if (hasRiceHashes()) {
+ if (!getRiceHashes().equals(other.getRiceHashes())) 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 (getRawHashesCount() > 0) {
+ hash = (37 * hash) + RAW_HASHES_FIELD_NUMBER;
+ hash = (53 * hash) + getRawHashesList().hashCode();
+ }
+ if (hasRiceHashes()) {
+ hash = (37 * hash) + RICE_HASHES_FIELD_NUMBER;
+ hash = (53 * hash) + getRiceHashes().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions 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.webrisk.v1beta1.ThreatEntryAdditions parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions 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.webrisk.v1beta1.ThreatEntryAdditions parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions 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.webrisk.v1beta1.ThreatEntryAdditions parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions 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.webrisk.v1beta1.ThreatEntryAdditions 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;
+ }
+ /**
+ *
+ *
+ * + * Contains the set of entries to add to a local database. + * May contain a combination of compressed and raw data in a single response. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ThreatEntryAdditions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public java.util.List+ * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public int getRawHashesCount() {
+ if (rawHashesBuilder_ == null) {
+ return rawHashes_.size();
+ } else {
+ return rawHashesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public com.google.webrisk.v1beta1.RawHashes getRawHashes(int index) {
+ if (rawHashesBuilder_ == null) {
+ return rawHashes_.get(index);
+ } else {
+ return rawHashesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public Builder setRawHashes(int index, com.google.webrisk.v1beta1.RawHashes value) {
+ if (rawHashesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRawHashesIsMutable();
+ rawHashes_.set(index, value);
+ onChanged();
+ } else {
+ rawHashesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public Builder setRawHashes(
+ int index, com.google.webrisk.v1beta1.RawHashes.Builder builderForValue) {
+ if (rawHashesBuilder_ == null) {
+ ensureRawHashesIsMutable();
+ rawHashes_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ rawHashesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public Builder addRawHashes(com.google.webrisk.v1beta1.RawHashes value) {
+ if (rawHashesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRawHashesIsMutable();
+ rawHashes_.add(value);
+ onChanged();
+ } else {
+ rawHashesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public Builder addRawHashes(int index, com.google.webrisk.v1beta1.RawHashes value) {
+ if (rawHashesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRawHashesIsMutable();
+ rawHashes_.add(index, value);
+ onChanged();
+ } else {
+ rawHashesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public Builder addRawHashes(com.google.webrisk.v1beta1.RawHashes.Builder builderForValue) {
+ if (rawHashesBuilder_ == null) {
+ ensureRawHashesIsMutable();
+ rawHashes_.add(builderForValue.build());
+ onChanged();
+ } else {
+ rawHashesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public Builder addRawHashes(
+ int index, com.google.webrisk.v1beta1.RawHashes.Builder builderForValue) {
+ if (rawHashesBuilder_ == null) {
+ ensureRawHashesIsMutable();
+ rawHashes_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ rawHashesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public Builder addAllRawHashes(
+ java.lang.Iterable extends com.google.webrisk.v1beta1.RawHashes> values) {
+ if (rawHashesBuilder_ == null) {
+ ensureRawHashesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rawHashes_);
+ onChanged();
+ } else {
+ rawHashesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public Builder clearRawHashes() {
+ if (rawHashesBuilder_ == null) {
+ rawHashes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ rawHashesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public Builder removeRawHashes(int index) {
+ if (rawHashesBuilder_ == null) {
+ ensureRawHashesIsMutable();
+ rawHashes_.remove(index);
+ onChanged();
+ } else {
+ rawHashesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public com.google.webrisk.v1beta1.RawHashes.Builder getRawHashesBuilder(int index) {
+ return getRawHashesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public com.google.webrisk.v1beta1.RawHashesOrBuilder getRawHashesOrBuilder(int index) {
+ if (rawHashesBuilder_ == null) {
+ return rawHashes_.get(index);
+ } else {
+ return rawHashesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public java.util.List extends com.google.webrisk.v1beta1.RawHashesOrBuilder>
+ getRawHashesOrBuilderList() {
+ if (rawHashesBuilder_ != null) {
+ return rawHashesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(rawHashes_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public com.google.webrisk.v1beta1.RawHashes.Builder addRawHashesBuilder() {
+ return getRawHashesFieldBuilder()
+ .addBuilder(com.google.webrisk.v1beta1.RawHashes.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public com.google.webrisk.v1beta1.RawHashes.Builder addRawHashesBuilder(int index) {
+ return getRawHashesFieldBuilder()
+ .addBuilder(index, com.google.webrisk.v1beta1.RawHashes.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ public java.util.List+ * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public boolean hasRiceHashes() {
+ return riceHashesBuilder_ != null || riceHashes_ != null;
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncoding getRiceHashes() {
+ if (riceHashesBuilder_ == null) {
+ return riceHashes_ == null
+ ? com.google.webrisk.v1beta1.RiceDeltaEncoding.getDefaultInstance()
+ : riceHashes_;
+ } else {
+ return riceHashesBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public Builder setRiceHashes(com.google.webrisk.v1beta1.RiceDeltaEncoding value) {
+ if (riceHashesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ riceHashes_ = value;
+ onChanged();
+ } else {
+ riceHashesBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public Builder setRiceHashes(
+ com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder builderForValue) {
+ if (riceHashesBuilder_ == null) {
+ riceHashes_ = builderForValue.build();
+ onChanged();
+ } else {
+ riceHashesBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public Builder mergeRiceHashes(com.google.webrisk.v1beta1.RiceDeltaEncoding value) {
+ if (riceHashesBuilder_ == null) {
+ if (riceHashes_ != null) {
+ riceHashes_ =
+ com.google.webrisk.v1beta1.RiceDeltaEncoding.newBuilder(riceHashes_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ riceHashes_ = value;
+ }
+ onChanged();
+ } else {
+ riceHashesBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public Builder clearRiceHashes() {
+ if (riceHashesBuilder_ == null) {
+ riceHashes_ = null;
+ onChanged();
+ } else {
+ riceHashes_ = null;
+ riceHashesBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder getRiceHashesBuilder() {
+
+ onChanged();
+ return getRiceHashesFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder getRiceHashesOrBuilder() {
+ if (riceHashesBuilder_ != null) {
+ return riceHashesBuilder_.getMessageOrBuilder();
+ } else {
+ return riceHashes_ == null
+ ? com.google.webrisk.v1beta1.RiceDeltaEncoding.getDefaultInstance()
+ : riceHashes_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.RiceDeltaEncoding,
+ com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder,
+ com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder>
+ getRiceHashesFieldBuilder() {
+ if (riceHashesBuilder_ == null) {
+ riceHashesBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.RiceDeltaEncoding,
+ com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder,
+ com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder>(
+ getRiceHashes(), getParentForChildren(), isClean());
+ riceHashes_ = null;
+ }
+ return riceHashesBuilder_;
+ }
+
+ @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.webrisk.v1beta1.ThreatEntryAdditions)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.ThreatEntryAdditions)
+ private static final com.google.webrisk.v1beta1.ThreatEntryAdditions DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.ThreatEntryAdditions();
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryAdditions getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ java.util.List+ * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ com.google.webrisk.v1beta1.RawHashes getRawHashes(int index);
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ int getRawHashesCount();
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ java.util.List extends com.google.webrisk.v1beta1.RawHashesOrBuilder>
+ getRawHashesOrBuilderList();
+ /**
+ *
+ *
+ * + * The raw SHA256-formatted entries. + * Repeated to allow returning sets of hashes with different prefix sizes. + *+ * + *
repeated .google.cloud.webrisk.v1beta1.RawHashes raw_hashes = 1;
+ */
+ com.google.webrisk.v1beta1.RawHashesOrBuilder getRawHashesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ boolean hasRiceHashes();
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ com.google.webrisk.v1beta1.RiceDeltaEncoding getRiceHashes();
+ /**
+ *
+ *
+ * + * The encoded 4-byte prefixes of SHA256-formatted entries, using a + * Golomb-Rice encoding. The hashes are converted to uint32, sorted in + * ascending order, then delta encoded and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_hashes = 2;
+ */
+ com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder getRiceHashesOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ThreatEntryRemovals.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ThreatEntryRemovals.java
new file mode 100644
index 000000000000..e16d50def76c
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ThreatEntryRemovals.java
@@ -0,0 +1,1003 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/**
+ *
+ *
+ * + * Contains the set of entries to remove from a local database. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ThreatEntryRemovals} + */ +public final class ThreatEntryRemovals extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1beta1.ThreatEntryRemovals) + ThreatEntryRemovalsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ThreatEntryRemovals.newBuilder() to construct. + private ThreatEntryRemovals(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ThreatEntryRemovals() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ThreatEntryRemovals( + 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.webrisk.v1beta1.RawIndices.Builder subBuilder = null; + if (rawIndices_ != null) { + subBuilder = rawIndices_.toBuilder(); + } + rawIndices_ = + input.readMessage( + com.google.webrisk.v1beta1.RawIndices.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rawIndices_); + rawIndices_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder subBuilder = null; + if (riceIndices_ != null) { + subBuilder = riceIndices_.toBuilder(); + } + riceIndices_ = + input.readMessage( + com.google.webrisk.v1beta1.RiceDeltaEncoding.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(riceIndices_); + riceIndices_ = 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.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_ThreatEntryRemovals_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.webrisk.v1beta1.WebRiskProto + .internal_static_google_cloud_webrisk_v1beta1_ThreatEntryRemovals_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.webrisk.v1beta1.ThreatEntryRemovals.class, + com.google.webrisk.v1beta1.ThreatEntryRemovals.Builder.class); + } + + public static final int RAW_INDICES_FIELD_NUMBER = 1; + private com.google.webrisk.v1beta1.RawIndices rawIndices_; + /** + * + * + *
+ * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public boolean hasRawIndices() {
+ return rawIndices_ != null;
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public com.google.webrisk.v1beta1.RawIndices getRawIndices() {
+ return rawIndices_ == null
+ ? com.google.webrisk.v1beta1.RawIndices.getDefaultInstance()
+ : rawIndices_;
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public com.google.webrisk.v1beta1.RawIndicesOrBuilder getRawIndicesOrBuilder() {
+ return getRawIndices();
+ }
+
+ public static final int RICE_INDICES_FIELD_NUMBER = 2;
+ private com.google.webrisk.v1beta1.RiceDeltaEncoding riceIndices_;
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public boolean hasRiceIndices() {
+ return riceIndices_ != null;
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncoding getRiceIndices() {
+ return riceIndices_ == null
+ ? com.google.webrisk.v1beta1.RiceDeltaEncoding.getDefaultInstance()
+ : riceIndices_;
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder getRiceIndicesOrBuilder() {
+ return getRiceIndices();
+ }
+
+ 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 (rawIndices_ != null) {
+ output.writeMessage(1, getRawIndices());
+ }
+ if (riceIndices_ != null) {
+ output.writeMessage(2, getRiceIndices());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (rawIndices_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRawIndices());
+ }
+ if (riceIndices_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRiceIndices());
+ }
+ 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.webrisk.v1beta1.ThreatEntryRemovals)) {
+ return super.equals(obj);
+ }
+ com.google.webrisk.v1beta1.ThreatEntryRemovals other =
+ (com.google.webrisk.v1beta1.ThreatEntryRemovals) obj;
+
+ if (hasRawIndices() != other.hasRawIndices()) return false;
+ if (hasRawIndices()) {
+ if (!getRawIndices().equals(other.getRawIndices())) return false;
+ }
+ if (hasRiceIndices() != other.hasRiceIndices()) return false;
+ if (hasRiceIndices()) {
+ if (!getRiceIndices().equals(other.getRiceIndices())) 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 (hasRawIndices()) {
+ hash = (37 * hash) + RAW_INDICES_FIELD_NUMBER;
+ hash = (53 * hash) + getRawIndices().hashCode();
+ }
+ if (hasRiceIndices()) {
+ hash = (37 * hash) + RICE_INDICES_FIELD_NUMBER;
+ hash = (53 * hash) + getRiceIndices().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals 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.webrisk.v1beta1.ThreatEntryRemovals parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals 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.webrisk.v1beta1.ThreatEntryRemovals parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals 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.webrisk.v1beta1.ThreatEntryRemovals parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals 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.webrisk.v1beta1.ThreatEntryRemovals 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;
+ }
+ /**
+ *
+ *
+ * + * Contains the set of entries to remove from a local database. + *+ * + * Protobuf type {@code google.cloud.webrisk.v1beta1.ThreatEntryRemovals} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public boolean hasRawIndices() {
+ return rawIndicesBuilder_ != null || rawIndices_ != null;
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public com.google.webrisk.v1beta1.RawIndices getRawIndices() {
+ if (rawIndicesBuilder_ == null) {
+ return rawIndices_ == null
+ ? com.google.webrisk.v1beta1.RawIndices.getDefaultInstance()
+ : rawIndices_;
+ } else {
+ return rawIndicesBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public Builder setRawIndices(com.google.webrisk.v1beta1.RawIndices value) {
+ if (rawIndicesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ rawIndices_ = value;
+ onChanged();
+ } else {
+ rawIndicesBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public Builder setRawIndices(com.google.webrisk.v1beta1.RawIndices.Builder builderForValue) {
+ if (rawIndicesBuilder_ == null) {
+ rawIndices_ = builderForValue.build();
+ onChanged();
+ } else {
+ rawIndicesBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public Builder mergeRawIndices(com.google.webrisk.v1beta1.RawIndices value) {
+ if (rawIndicesBuilder_ == null) {
+ if (rawIndices_ != null) {
+ rawIndices_ =
+ com.google.webrisk.v1beta1.RawIndices.newBuilder(rawIndices_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ rawIndices_ = value;
+ }
+ onChanged();
+ } else {
+ rawIndicesBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public Builder clearRawIndices() {
+ if (rawIndicesBuilder_ == null) {
+ rawIndices_ = null;
+ onChanged();
+ } else {
+ rawIndices_ = null;
+ rawIndicesBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public com.google.webrisk.v1beta1.RawIndices.Builder getRawIndicesBuilder() {
+
+ onChanged();
+ return getRawIndicesFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ public com.google.webrisk.v1beta1.RawIndicesOrBuilder getRawIndicesOrBuilder() {
+ if (rawIndicesBuilder_ != null) {
+ return rawIndicesBuilder_.getMessageOrBuilder();
+ } else {
+ return rawIndices_ == null
+ ? com.google.webrisk.v1beta1.RawIndices.getDefaultInstance()
+ : rawIndices_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.RawIndices,
+ com.google.webrisk.v1beta1.RawIndices.Builder,
+ com.google.webrisk.v1beta1.RawIndicesOrBuilder>
+ getRawIndicesFieldBuilder() {
+ if (rawIndicesBuilder_ == null) {
+ rawIndicesBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.RawIndices,
+ com.google.webrisk.v1beta1.RawIndices.Builder,
+ com.google.webrisk.v1beta1.RawIndicesOrBuilder>(
+ getRawIndices(), getParentForChildren(), isClean());
+ rawIndices_ = null;
+ }
+ return rawIndicesBuilder_;
+ }
+
+ private com.google.webrisk.v1beta1.RiceDeltaEncoding riceIndices_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.RiceDeltaEncoding,
+ com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder,
+ com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder>
+ riceIndicesBuilder_;
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public boolean hasRiceIndices() {
+ return riceIndicesBuilder_ != null || riceIndices_ != null;
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncoding getRiceIndices() {
+ if (riceIndicesBuilder_ == null) {
+ return riceIndices_ == null
+ ? com.google.webrisk.v1beta1.RiceDeltaEncoding.getDefaultInstance()
+ : riceIndices_;
+ } else {
+ return riceIndicesBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public Builder setRiceIndices(com.google.webrisk.v1beta1.RiceDeltaEncoding value) {
+ if (riceIndicesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ riceIndices_ = value;
+ onChanged();
+ } else {
+ riceIndicesBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public Builder setRiceIndices(
+ com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder builderForValue) {
+ if (riceIndicesBuilder_ == null) {
+ riceIndices_ = builderForValue.build();
+ onChanged();
+ } else {
+ riceIndicesBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public Builder mergeRiceIndices(com.google.webrisk.v1beta1.RiceDeltaEncoding value) {
+ if (riceIndicesBuilder_ == null) {
+ if (riceIndices_ != null) {
+ riceIndices_ =
+ com.google.webrisk.v1beta1.RiceDeltaEncoding.newBuilder(riceIndices_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ riceIndices_ = value;
+ }
+ onChanged();
+ } else {
+ riceIndicesBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public Builder clearRiceIndices() {
+ if (riceIndicesBuilder_ == null) {
+ riceIndices_ = null;
+ onChanged();
+ } else {
+ riceIndices_ = null;
+ riceIndicesBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder getRiceIndicesBuilder() {
+
+ onChanged();
+ return getRiceIndicesFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ public com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder getRiceIndicesOrBuilder() {
+ if (riceIndicesBuilder_ != null) {
+ return riceIndicesBuilder_.getMessageOrBuilder();
+ } else {
+ return riceIndices_ == null
+ ? com.google.webrisk.v1beta1.RiceDeltaEncoding.getDefaultInstance()
+ : riceIndices_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.RiceDeltaEncoding,
+ com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder,
+ com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder>
+ getRiceIndicesFieldBuilder() {
+ if (riceIndicesBuilder_ == null) {
+ riceIndicesBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.webrisk.v1beta1.RiceDeltaEncoding,
+ com.google.webrisk.v1beta1.RiceDeltaEncoding.Builder,
+ com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder>(
+ getRiceIndices(), getParentForChildren(), isClean());
+ riceIndices_ = null;
+ }
+ return riceIndicesBuilder_;
+ }
+
+ @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.webrisk.v1beta1.ThreatEntryRemovals)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.ThreatEntryRemovals)
+ private static final com.google.webrisk.v1beta1.ThreatEntryRemovals DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.ThreatEntryRemovals();
+ }
+
+ public static com.google.webrisk.v1beta1.ThreatEntryRemovals getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ boolean hasRawIndices();
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ com.google.webrisk.v1beta1.RawIndices getRawIndices();
+ /**
+ *
+ *
+ * + * The raw removal indices for a local list. + *+ * + *
.google.cloud.webrisk.v1beta1.RawIndices raw_indices = 1;
+ */
+ com.google.webrisk.v1beta1.RawIndicesOrBuilder getRawIndicesOrBuilder();
+
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ boolean hasRiceIndices();
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ com.google.webrisk.v1beta1.RiceDeltaEncoding getRiceIndices();
+ /**
+ *
+ *
+ * + * The encoded local, lexicographically-sorted list indices, using a + * Golomb-Rice encoding. Used for sending compressed removal indices. The + * removal indices (uint32) are sorted in ascending order, then delta encoded + * and stored as encoded_data. + *+ * + *
.google.cloud.webrisk.v1beta1.RiceDeltaEncoding rice_indices = 2;
+ */
+ com.google.webrisk.v1beta1.RiceDeltaEncodingOrBuilder getRiceIndicesOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ThreatType.java b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ThreatType.java
new file mode 100644
index 000000000000..d1373489fff3
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-webrisk-v1beta1/src/main/java/com/google/webrisk/v1beta1/ThreatType.java
@@ -0,0 +1,172 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/webrisk/v1beta1/webrisk.proto
+
+package com.google.webrisk.v1beta1;
+
+/**
+ *
+ *
+ * + * The type of threat. This maps dirrectly to the threat list a threat may + * belong to. + *+ * + * Protobuf enum {@code google.cloud.webrisk.v1beta1.ThreatType} + */ +public enum ThreatType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Unknown. + *+ * + *
THREAT_TYPE_UNSPECIFIED = 0;
+ */
+ THREAT_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Malware targeting any platform. + *+ * + *
MALWARE = 1;
+ */
+ MALWARE(1),
+ /**
+ *
+ *
+ * + * Social engineering targeting any platform. + *+ * + *
SOCIAL_ENGINEERING = 2;
+ */
+ SOCIAL_ENGINEERING(2),
+ /**
+ *
+ *
+ * + * Unwanted software targeting any platform. + *+ * + *
UNWANTED_SOFTWARE = 3;
+ */
+ UNWANTED_SOFTWARE(3),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Unknown. + *+ * + *
THREAT_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int THREAT_TYPE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Malware targeting any platform. + *+ * + *
MALWARE = 1;
+ */
+ public static final int MALWARE_VALUE = 1;
+ /**
+ *
+ *
+ * + * Social engineering targeting any platform. + *+ * + *
SOCIAL_ENGINEERING = 2;
+ */
+ public static final int SOCIAL_ENGINEERING_VALUE = 2;
+ /**
+ *
+ *
+ * + * Unwanted software targeting any platform. + *+ * + *
UNWANTED_SOFTWARE = 3;
+ */
+ public static final int UNWANTED_SOFTWARE_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 ThreatType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static ThreatType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return THREAT_TYPE_UNSPECIFIED;
+ case 1:
+ return MALWARE;
+ case 2:
+ return SOCIAL_ENGINEERING;
+ case 3:
+ return UNWANTED_SOFTWARE;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMapThis class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
+ *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * ThreatType threatType = ThreatType.THREAT_TYPE_UNSPECIFIED;
+ * ByteString versionToken = ByteString.copyFromUtf8("");
+ * ComputeThreatListDiffRequest.Constraints constraints = ComputeThreatListDiffRequest.Constraints.newBuilder().build();
+ * ComputeThreatListDiffResponse response = webRiskServiceV1Beta1Client.computeThreatListDiff(threatType, versionToken, constraints);
+ * }
+ *
+ *
+ *
+ * Note: close() needs to be called on the webRiskServiceV1Beta1Client object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of WebRiskServiceV1Beta1Settings + * to create(). For example: + * + *
To customize credentials: + * + *
+ *
+ * WebRiskServiceV1Beta1Settings webRiskServiceV1Beta1Settings =
+ * WebRiskServiceV1Beta1Settings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client =
+ * WebRiskServiceV1Beta1Client.create(webRiskServiceV1Beta1Settings);
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ *
+ * WebRiskServiceV1Beta1Settings webRiskServiceV1Beta1Settings =
+ * WebRiskServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client =
+ * WebRiskServiceV1Beta1Client.create(webRiskServiceV1Beta1Settings);
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class WebRiskServiceV1Beta1Client implements BackgroundResource {
+ private final WebRiskServiceV1Beta1Settings settings;
+ private final WebRiskServiceV1Beta1Stub stub;
+
+ /** Constructs an instance of WebRiskServiceV1Beta1Client with default settings. */
+ public static final WebRiskServiceV1Beta1Client create() throws IOException {
+ return create(WebRiskServiceV1Beta1Settings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of WebRiskServiceV1Beta1Client, using the given settings. The channels
+ * are created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final WebRiskServiceV1Beta1Client create(WebRiskServiceV1Beta1Settings settings)
+ throws IOException {
+ return new WebRiskServiceV1Beta1Client(settings);
+ }
+
+ /**
+ * Constructs an instance of WebRiskServiceV1Beta1Client, using the given stub for making calls.
+ * This is for advanced usage - prefer to use WebRiskServiceV1Beta1Settings}.
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final WebRiskServiceV1Beta1Client create(WebRiskServiceV1Beta1Stub stub) {
+ return new WebRiskServiceV1Beta1Client(stub);
+ }
+
+ /**
+ * Constructs an instance of WebRiskServiceV1Beta1Client, using the given settings. This is
+ * protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected WebRiskServiceV1Beta1Client(WebRiskServiceV1Beta1Settings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((WebRiskServiceV1Beta1StubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected WebRiskServiceV1Beta1Client(WebRiskServiceV1Beta1Stub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final WebRiskServiceV1Beta1Settings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public WebRiskServiceV1Beta1Stub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets the most recent threat list diffs.
+ *
+ * Sample code: + * + *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * ThreatType threatType = ThreatType.THREAT_TYPE_UNSPECIFIED;
+ * ByteString versionToken = ByteString.copyFromUtf8("");
+ * ComputeThreatListDiffRequest.Constraints constraints = ComputeThreatListDiffRequest.Constraints.newBuilder().build();
+ * ComputeThreatListDiffResponse response = webRiskServiceV1Beta1Client.computeThreatListDiff(threatType, versionToken, constraints);
+ * }
+ *
+ *
+ * @param threatType Required. The ThreatList to update.
+ * @param versionToken The current version token of the client for the requested list (the client
+ * version that was received from the last successful diff).
+ * @param constraints The constraints associated with this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ComputeThreatListDiffResponse computeThreatListDiff(
+ ThreatType threatType,
+ ByteString versionToken,
+ ComputeThreatListDiffRequest.Constraints constraints) {
+
+ ComputeThreatListDiffRequest request =
+ ComputeThreatListDiffRequest.newBuilder()
+ .setThreatType(threatType)
+ .setVersionToken(versionToken)
+ .setConstraints(constraints)
+ .build();
+ return computeThreatListDiff(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets the most recent threat list diffs.
+ *
+ * Sample code: + * + *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * ThreatType threatType = ThreatType.THREAT_TYPE_UNSPECIFIED;
+ * ComputeThreatListDiffRequest.Constraints constraints = ComputeThreatListDiffRequest.Constraints.newBuilder().build();
+ * ComputeThreatListDiffRequest request = ComputeThreatListDiffRequest.newBuilder()
+ * .setThreatType(threatType)
+ * .setConstraints(constraints)
+ * .build();
+ * ComputeThreatListDiffResponse response = webRiskServiceV1Beta1Client.computeThreatListDiff(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 ComputeThreatListDiffResponse computeThreatListDiff(
+ ComputeThreatListDiffRequest request) {
+ return computeThreatListDiffCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets the most recent threat list diffs.
+ *
+ * Sample code: + * + *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * ThreatType threatType = ThreatType.THREAT_TYPE_UNSPECIFIED;
+ * ComputeThreatListDiffRequest.Constraints constraints = ComputeThreatListDiffRequest.Constraints.newBuilder().build();
+ * ComputeThreatListDiffRequest request = ComputeThreatListDiffRequest.newBuilder()
+ * .setThreatType(threatType)
+ * .setConstraints(constraints)
+ * .build();
+ * ApiFuture<ComputeThreatListDiffResponse> future = webRiskServiceV1Beta1Client.computeThreatListDiffCallable().futureCall(request);
+ * // Do something
+ * ComputeThreatListDiffResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * String uri = "";
+ * List<ThreatType> threatTypes = new ArrayList<>();
+ * SearchUrisResponse response = webRiskServiceV1Beta1Client.searchUris(uri, threatTypes);
+ * }
+ *
+ *
+ * @param uri The URI to be checked for matches.
+ * @param threatTypes Required. The ThreatLists to search in.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchUrisResponse searchUris(String uri, ListSample code: + * + *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * String uri = "";
+ * List<ThreatType> threatTypes = new ArrayList<>();
+ * SearchUrisRequest request = SearchUrisRequest.newBuilder()
+ * .setUri(uri)
+ * .addAllThreatTypes(threatTypes)
+ * .build();
+ * SearchUrisResponse response = webRiskServiceV1Beta1Client.searchUris(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 SearchUrisResponse searchUris(SearchUrisRequest request) {
+ return searchUrisCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * This method is used to check whether a URI is on a given threatList.
+ *
+ * Sample code: + * + *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * String uri = "";
+ * List<ThreatType> threatTypes = new ArrayList<>();
+ * SearchUrisRequest request = SearchUrisRequest.newBuilder()
+ * .setUri(uri)
+ * .addAllThreatTypes(threatTypes)
+ * .build();
+ * ApiFuture<SearchUrisResponse> future = webRiskServiceV1Beta1Client.searchUrisCallable().futureCall(request);
+ * // Do something
+ * SearchUrisResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * ByteString hashPrefix = ByteString.copyFromUtf8("");
+ * List<ThreatType> threatTypes = new ArrayList<>();
+ * SearchHashesResponse response = webRiskServiceV1Beta1Client.searchHashes(hashPrefix, threatTypes);
+ * }
+ *
+ *
+ * @param hashPrefix A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
+ * hash. For JSON requests, this field is base64-encoded.
+ * @param threatTypes Required. The ThreatLists to search in.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchHashesResponse searchHashes(
+ ByteString hashPrefix, ListSample code: + * + *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * SearchHashesRequest request = SearchHashesRequest.newBuilder().build();
+ * SearchHashesResponse response = webRiskServiceV1Beta1Client.searchHashes(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 SearchHashesResponse searchHashes(SearchHashesRequest request) {
+ return searchHashesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets the full hashes that match the requested hash prefix. This is used after a hash prefix is
+ * looked up in a threatList and there is a match. The client side threatList only holds partial
+ * hashes so the client must query this method to determine if there is a full hash match of a
+ * threat.
+ *
+ * Sample code: + * + *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * SearchHashesRequest request = SearchHashesRequest.newBuilder().build();
+ * ApiFuture<SearchHashesResponse> future = webRiskServiceV1Beta1Client.searchHashesCallable().futureCall(request);
+ * // Do something
+ * SearchHashesResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of computeThreatListDiff to 30 seconds: + * + *
+ *
+ * WebRiskServiceV1Beta1Settings.Builder webRiskServiceV1Beta1SettingsBuilder =
+ * WebRiskServiceV1Beta1Settings.newBuilder();
+ * webRiskServiceV1Beta1SettingsBuilder.computeThreatListDiffSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * WebRiskServiceV1Beta1Settings webRiskServiceV1Beta1Settings = webRiskServiceV1Beta1SettingsBuilder.build();
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class WebRiskServiceV1Beta1Settings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * =========================== WebRiskServiceV1Beta1Client ===========================
+ *
+ * Service Description: Web Risk v1beta1 API defines an interface to detect malicious URLs on
+ * your website and in client applications.
+ *
+ * Sample for WebRiskServiceV1Beta1Client:
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator")
+@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+public class GrpcWebRiskServiceV1Beta1CallableFactory implements GrpcStubCallableFactory {
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public class GrpcWebRiskServiceV1Beta1Stub extends WebRiskServiceV1Beta1Stub {
+
+ private static final MethodDescriptor This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator")
+@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+public abstract class WebRiskServiceV1Beta1Stub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object. For
+ * example, to set the total timeout of computeThreatListDiff to 30 seconds:
+ *
+ *
+ *
+ */
+package com.google.cloud.webrisk.v1beta1;
diff --git a/google-cloud-clients/google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/stub/GrpcWebRiskServiceV1Beta1CallableFactory.java b/google-cloud-clients/google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/stub/GrpcWebRiskServiceV1Beta1CallableFactory.java
new file mode 100644
index 000000000000..246cba51329c
--- /dev/null
+++ b/google-cloud-clients/google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/stub/GrpcWebRiskServiceV1Beta1CallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.webrisk.v1beta1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * gRPC callable factory implementation for Web Risk API.
+ *
+ *
+ * try (WebRiskServiceV1Beta1Client webRiskServiceV1Beta1Client = WebRiskServiceV1Beta1Client.create()) {
+ * ThreatType threatType = ThreatType.THREAT_TYPE_UNSPECIFIED;
+ * ByteString versionToken = ByteString.copyFromUtf8("");
+ * ComputeThreatListDiffRequest.Constraints constraints = ComputeThreatListDiffRequest.Constraints.newBuilder().build();
+ * ComputeThreatListDiffResponse response = webRiskServiceV1Beta1Client.computeThreatListDiff(threatType, versionToken, constraints);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class WebRiskServiceV1Beta1StubSettings
+ extends StubSettings
+ * WebRiskServiceV1Beta1StubSettings.Builder webRiskServiceV1Beta1SettingsBuilder =
+ * WebRiskServiceV1Beta1StubSettings.newBuilder();
+ * webRiskServiceV1Beta1SettingsBuilder.computeThreatListDiffSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * WebRiskServiceV1Beta1StubSettings webRiskServiceV1Beta1Settings = webRiskServiceV1Beta1SettingsBuilder.build();
+ *
+ *