Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/webrisk/v1beta1/webrisk.proto
// Protobuf Java Version: 3.25.3
package com.google.webrisk.v1beta1;
/**
*
*
*
* 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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ComputeThreatListDiffRequest();
}
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;
*
* @return The maxDiffEntries.
*/
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;
*
* @return The maxDatabaseEntries.
*/
int getMaxDatabaseEntries();
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @return A list containing the supportedCompressions.
*/
java.util.List getSupportedCompressionsList();
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @return The count of supportedCompressions.
*/
int getSupportedCompressionsCount();
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @param index The index of the element to return.
* @return The supportedCompressions at the given index.
*/
com.google.webrisk.v1beta1.CompressionType getSupportedCompressions(int index);
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @return A list containing the enum numeric values on the wire for supportedCompressions.
*/
java.util.List getSupportedCompressionsValueList();
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of supportedCompressions at the given index.
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Constraints();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.webrisk.v1beta1.WebRiskProto
.internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.webrisk.v1beta1.WebRiskProto
.internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.class,
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder.class);
}
public static final int MAX_DIFF_ENTRIES_FIELD_NUMBER = 1;
private int maxDiffEntries_ = 0;
/**
*
*
*
* 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;
*
* @return The maxDiffEntries.
*/
@java.lang.Override
public int getMaxDiffEntries() {
return maxDiffEntries_;
}
public static final int MAX_DATABASE_ENTRIES_FIELD_NUMBER = 2;
private int maxDatabaseEntries_ = 0;
/**
*
*
*
* 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;
*
* @return The maxDatabaseEntries.
*/
@java.lang.Override
public int getMaxDatabaseEntries() {
return maxDatabaseEntries_;
}
public static final int SUPPORTED_COMPRESSIONS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List supportedCompressions_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.webrisk.v1beta1.CompressionType>
supportedCompressions_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.webrisk.v1beta1.CompressionType>() {
public com.google.webrisk.v1beta1.CompressionType convert(java.lang.Integer from) {
com.google.webrisk.v1beta1.CompressionType result =
com.google.webrisk.v1beta1.CompressionType.forNumber(from);
return result == null
? com.google.webrisk.v1beta1.CompressionType.UNRECOGNIZED
: result;
}
};
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @return A list containing the supportedCompressions.
*/
@java.lang.Override
public java.util.List
getSupportedCompressionsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.webrisk.v1beta1.CompressionType>(
supportedCompressions_, supportedCompressions_converter_);
}
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @return The count of supportedCompressions.
*/
@java.lang.Override
public int getSupportedCompressionsCount() {
return supportedCompressions_.size();
}
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @param index The index of the element to return.
* @return The supportedCompressions at the given index.
*/
@java.lang.Override
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;
*
*
* @return A list containing the enum numeric values on the wire for supportedCompressions.
*/
@java.lang.Override
public java.util.List getSupportedCompressionsValueList() {
return supportedCompressions_;
}
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of supportedCompressions at the given index.
*/
@java.lang.Override
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));
}
getUnknownFields().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 += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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
implements
// @@protoc_insertion_point(builder_implements:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.webrisk.v1beta1.WebRiskProto
.internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.webrisk.v1beta1.WebRiskProto
.internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.class,
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.Builder.class);
}
// Construct using
// com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
maxDiffEntries_ = 0;
maxDatabaseEntries_ = 0;
supportedCompressions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.webrisk.v1beta1.WebRiskProto
.internal_static_google_cloud_webrisk_v1beta1_ComputeThreatListDiffRequest_Constraints_descriptor;
}
@java.lang.Override
public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
getDefaultInstanceForType() {
return com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
.getDefaultInstance();
}
@java.lang.Override
public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints build() {
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints buildPartial() {
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints result =
new com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints result) {
if (((bitField0_ & 0x00000004) != 0)) {
supportedCompressions_ = java.util.Collections.unmodifiableList(supportedCompressions_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.supportedCompressions_ = supportedCompressions_;
}
private void buildPartial0(
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.maxDiffEntries_ = maxDiffEntries_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.maxDatabaseEntries_ = maxDatabaseEntries_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) {
return mergeFrom(
(com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints other) {
if (other
== com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
.getDefaultInstance()) return this;
if (other.getMaxDiffEntries() != 0) {
setMaxDiffEntries(other.getMaxDiffEntries());
}
if (other.getMaxDatabaseEntries() != 0) {
setMaxDatabaseEntries(other.getMaxDatabaseEntries());
}
if (!other.supportedCompressions_.isEmpty()) {
if (supportedCompressions_.isEmpty()) {
supportedCompressions_ = other.supportedCompressions_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureSupportedCompressionsIsMutable();
supportedCompressions_.addAll(other.supportedCompressions_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
maxDiffEntries_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
maxDatabaseEntries_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24:
{
int tmpRaw = input.readEnum();
ensureSupportedCompressionsIsMutable();
supportedCompressions_.add(tmpRaw);
break;
} // case 24
case 26:
{
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensureSupportedCompressionsIsMutable();
supportedCompressions_.add(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 26
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int 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;
*
* @return The maxDiffEntries.
*/
@java.lang.Override
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;
*
* @param value The maxDiffEntries to set.
* @return This builder for chaining.
*/
public Builder setMaxDiffEntries(int value) {
maxDiffEntries_ = value;
bitField0_ |= 0x00000001;
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;
*
* @return This builder for chaining.
*/
public Builder clearMaxDiffEntries() {
bitField0_ = (bitField0_ & ~0x00000001);
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;
*
* @return The maxDatabaseEntries.
*/
@java.lang.Override
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;
*
* @param value The maxDatabaseEntries to set.
* @return This builder for chaining.
*/
public Builder setMaxDatabaseEntries(int value) {
maxDatabaseEntries_ = value;
bitField0_ |= 0x00000002;
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.
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @return A list containing the supportedCompressions.
*/
public java.util.List
getSupportedCompressionsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.webrisk.v1beta1.CompressionType>(
supportedCompressions_, supportedCompressions_converter_);
}
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @return The count of supportedCompressions.
*/
public int getSupportedCompressionsCount() {
return supportedCompressions_.size();
}
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @param index The index of the element to return.
* @return The supportedCompressions at the given index.
*/
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;
*
*
* @param index The index to set the value at.
* @param value The supportedCompressions to set.
* @return This builder for chaining.
*/
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;
*
*
* @param value The supportedCompressions to add.
* @return This builder for chaining.
*/
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;
*
*
* @param values The supportedCompressions to add.
* @return This builder for chaining.
*/
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.
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @return A list containing the enum numeric values on the wire for supportedCompressions.
*/
public java.util.List getSupportedCompressionsValueList() {
return java.util.Collections.unmodifiableList(supportedCompressions_);
}
/**
*
*
*
* The compression types supported by the client.
*
*
* repeated .google.cloud.webrisk.v1beta1.CompressionType supported_compressions = 3;
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of supportedCompressions at the given index.
*/
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;
*
*
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for supportedCompressions to set.
* @return This builder for chaining.
*/
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;
*
*
* @param value The enum numeric value on the wire for supportedCompressions to add.
* @return This builder for chaining.
*/
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;
*
*
* @param values The enum numeric values on the wire for supportedCompressions to add.
* @return This builder for chaining.
*/
public Builder addAllSupportedCompressionsValue(
java.lang.Iterable values) {
ensureSupportedCompressionsIsMutable();
for (int value : values) {
supportedCompressions_.add(value);
}
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)
}
// @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints)
private static final com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints();
}
public static com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Constraints parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int THREAT_TYPE_FIELD_NUMBER = 1;
private int threatType_ = 0;
/**
*
*
*
* The ThreatList to update.
*
*
*
* .google.cloud.webrisk.v1beta1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for threatType.
*/
@java.lang.Override
public int getThreatTypeValue() {
return threatType_;
}
/**
*
*
*
* The ThreatList to update.
*
*
*
* .google.cloud.webrisk.v1beta1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The threatType.
*/
@java.lang.Override
public com.google.webrisk.v1beta1.ThreatType getThreatType() {
com.google.webrisk.v1beta1.ThreatType result =
com.google.webrisk.v1beta1.ThreatType.forNumber(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_ = 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;
*
* @return The versionToken.
*/
@java.lang.Override
public com.google.protobuf.ByteString getVersionToken() {
return versionToken_;
}
public static final int CONSTRAINTS_FIELD_NUMBER = 3;
private com.google.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints_;
/**
*
*
*
* Required. The constraints associated with this request.
*
*
*
* .google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the constraints field is set.
*/
@java.lang.Override
public boolean hasConstraints() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. The constraints associated with this request.
*