1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/webrisk/v1/webrisk.proto 18 19 package com.google.webrisk.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Describes an API diff request. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.webrisk.v1.ComputeThreatListDiffRequest} 29 */ 30 public final class ComputeThreatListDiffRequest extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1.ComputeThreatListDiffRequest) 33 ComputeThreatListDiffRequestOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ComputeThreatListDiffRequest.newBuilder() to construct. ComputeThreatListDiffRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ComputeThreatListDiffRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ComputeThreatListDiffRequest()40 private ComputeThreatListDiffRequest() { 41 threatType_ = 0; 42 versionToken_ = com.google.protobuf.ByteString.EMPTY; 43 } 44 45 @java.lang.Override 46 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)47 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 48 return new ComputeThreatListDiffRequest(); 49 } 50 51 @java.lang.Override getUnknownFields()52 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 53 return this.unknownFields; 54 } 55 getDescriptor()56 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 57 return com.google.webrisk.v1.WebRiskProto 58 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_descriptor; 59 } 60 61 @java.lang.Override 62 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()63 internalGetFieldAccessorTable() { 64 return com.google.webrisk.v1.WebRiskProto 65 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_fieldAccessorTable 66 .ensureFieldAccessorsInitialized( 67 com.google.webrisk.v1.ComputeThreatListDiffRequest.class, 68 com.google.webrisk.v1.ComputeThreatListDiffRequest.Builder.class); 69 } 70 71 public interface ConstraintsOrBuilder 72 extends 73 // @@protoc_insertion_point(interface_extends:google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints) 74 com.google.protobuf.MessageOrBuilder { 75 76 /** 77 * 78 * 79 * <pre> 80 * The maximum size in number of entries. The diff will not contain more 81 * entries than this value. This should be a power of 2 between 2**10 and 82 * 2**20. If zero, no diff size limit is set. 83 * </pre> 84 * 85 * <code>int32 max_diff_entries = 1;</code> 86 * 87 * @return The maxDiffEntries. 88 */ getMaxDiffEntries()89 int getMaxDiffEntries(); 90 91 /** 92 * 93 * 94 * <pre> 95 * Sets the maximum number of entries that the client is willing to have 96 * in the local database. This should be a power of 2 between 2**10 and 97 * 2**20. If zero, no database size limit is set. 98 * </pre> 99 * 100 * <code>int32 max_database_entries = 2;</code> 101 * 102 * @return The maxDatabaseEntries. 103 */ getMaxDatabaseEntries()104 int getMaxDatabaseEntries(); 105 106 /** 107 * 108 * 109 * <pre> 110 * The compression types supported by the client. 111 * </pre> 112 * 113 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 114 * 115 * @return A list containing the supportedCompressions. 116 */ getSupportedCompressionsList()117 java.util.List<com.google.webrisk.v1.CompressionType> getSupportedCompressionsList(); 118 /** 119 * 120 * 121 * <pre> 122 * The compression types supported by the client. 123 * </pre> 124 * 125 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 126 * 127 * @return The count of supportedCompressions. 128 */ getSupportedCompressionsCount()129 int getSupportedCompressionsCount(); 130 /** 131 * 132 * 133 * <pre> 134 * The compression types supported by the client. 135 * </pre> 136 * 137 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 138 * 139 * @param index The index of the element to return. 140 * @return The supportedCompressions at the given index. 141 */ getSupportedCompressions(int index)142 com.google.webrisk.v1.CompressionType getSupportedCompressions(int index); 143 /** 144 * 145 * 146 * <pre> 147 * The compression types supported by the client. 148 * </pre> 149 * 150 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 151 * 152 * @return A list containing the enum numeric values on the wire for supportedCompressions. 153 */ getSupportedCompressionsValueList()154 java.util.List<java.lang.Integer> getSupportedCompressionsValueList(); 155 /** 156 * 157 * 158 * <pre> 159 * The compression types supported by the client. 160 * </pre> 161 * 162 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 163 * 164 * @param index The index of the value to return. 165 * @return The enum numeric value on the wire of supportedCompressions at the given index. 166 */ getSupportedCompressionsValue(int index)167 int getSupportedCompressionsValue(int index); 168 } 169 /** 170 * 171 * 172 * <pre> 173 * The constraints for this diff. 174 * </pre> 175 * 176 * Protobuf type {@code google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints} 177 */ 178 public static final class Constraints extends com.google.protobuf.GeneratedMessageV3 179 implements 180 // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints) 181 ConstraintsOrBuilder { 182 private static final long serialVersionUID = 0L; 183 // Use Constraints.newBuilder() to construct. Constraints(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)184 private Constraints(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 185 super(builder); 186 } 187 Constraints()188 private Constraints() { 189 supportedCompressions_ = java.util.Collections.emptyList(); 190 } 191 192 @java.lang.Override 193 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)194 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 195 return new Constraints(); 196 } 197 198 @java.lang.Override getUnknownFields()199 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 200 return this.unknownFields; 201 } 202 getDescriptor()203 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 204 return com.google.webrisk.v1.WebRiskProto 205 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_Constraints_descriptor; 206 } 207 208 @java.lang.Override 209 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()210 internalGetFieldAccessorTable() { 211 return com.google.webrisk.v1.WebRiskProto 212 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_Constraints_fieldAccessorTable 213 .ensureFieldAccessorsInitialized( 214 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.class, 215 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.Builder.class); 216 } 217 218 public static final int MAX_DIFF_ENTRIES_FIELD_NUMBER = 1; 219 private int maxDiffEntries_ = 0; 220 /** 221 * 222 * 223 * <pre> 224 * The maximum size in number of entries. The diff will not contain more 225 * entries than this value. This should be a power of 2 between 2**10 and 226 * 2**20. If zero, no diff size limit is set. 227 * </pre> 228 * 229 * <code>int32 max_diff_entries = 1;</code> 230 * 231 * @return The maxDiffEntries. 232 */ 233 @java.lang.Override getMaxDiffEntries()234 public int getMaxDiffEntries() { 235 return maxDiffEntries_; 236 } 237 238 public static final int MAX_DATABASE_ENTRIES_FIELD_NUMBER = 2; 239 private int maxDatabaseEntries_ = 0; 240 /** 241 * 242 * 243 * <pre> 244 * Sets the maximum number of entries that the client is willing to have 245 * in the local database. This should be a power of 2 between 2**10 and 246 * 2**20. If zero, no database size limit is set. 247 * </pre> 248 * 249 * <code>int32 max_database_entries = 2;</code> 250 * 251 * @return The maxDatabaseEntries. 252 */ 253 @java.lang.Override getMaxDatabaseEntries()254 public int getMaxDatabaseEntries() { 255 return maxDatabaseEntries_; 256 } 257 258 public static final int SUPPORTED_COMPRESSIONS_FIELD_NUMBER = 3; 259 260 @SuppressWarnings("serial") 261 private java.util.List<java.lang.Integer> supportedCompressions_; 262 263 private static final com.google.protobuf.Internal.ListAdapter.Converter< 264 java.lang.Integer, com.google.webrisk.v1.CompressionType> 265 supportedCompressions_converter_ = 266 new com.google.protobuf.Internal.ListAdapter.Converter< 267 java.lang.Integer, com.google.webrisk.v1.CompressionType>() { 268 public com.google.webrisk.v1.CompressionType convert(java.lang.Integer from) { 269 com.google.webrisk.v1.CompressionType result = 270 com.google.webrisk.v1.CompressionType.forNumber(from); 271 return result == null ? com.google.webrisk.v1.CompressionType.UNRECOGNIZED : result; 272 } 273 }; 274 /** 275 * 276 * 277 * <pre> 278 * The compression types supported by the client. 279 * </pre> 280 * 281 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 282 * 283 * @return A list containing the supportedCompressions. 284 */ 285 @java.lang.Override getSupportedCompressionsList()286 public java.util.List<com.google.webrisk.v1.CompressionType> getSupportedCompressionsList() { 287 return new com.google.protobuf.Internal.ListAdapter< 288 java.lang.Integer, com.google.webrisk.v1.CompressionType>( 289 supportedCompressions_, supportedCompressions_converter_); 290 } 291 /** 292 * 293 * 294 * <pre> 295 * The compression types supported by the client. 296 * </pre> 297 * 298 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 299 * 300 * @return The count of supportedCompressions. 301 */ 302 @java.lang.Override getSupportedCompressionsCount()303 public int getSupportedCompressionsCount() { 304 return supportedCompressions_.size(); 305 } 306 /** 307 * 308 * 309 * <pre> 310 * The compression types supported by the client. 311 * </pre> 312 * 313 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 314 * 315 * @param index The index of the element to return. 316 * @return The supportedCompressions at the given index. 317 */ 318 @java.lang.Override getSupportedCompressions(int index)319 public com.google.webrisk.v1.CompressionType getSupportedCompressions(int index) { 320 return supportedCompressions_converter_.convert(supportedCompressions_.get(index)); 321 } 322 /** 323 * 324 * 325 * <pre> 326 * The compression types supported by the client. 327 * </pre> 328 * 329 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 330 * 331 * @return A list containing the enum numeric values on the wire for supportedCompressions. 332 */ 333 @java.lang.Override getSupportedCompressionsValueList()334 public java.util.List<java.lang.Integer> getSupportedCompressionsValueList() { 335 return supportedCompressions_; 336 } 337 /** 338 * 339 * 340 * <pre> 341 * The compression types supported by the client. 342 * </pre> 343 * 344 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 345 * 346 * @param index The index of the value to return. 347 * @return The enum numeric value on the wire of supportedCompressions at the given index. 348 */ 349 @java.lang.Override getSupportedCompressionsValue(int index)350 public int getSupportedCompressionsValue(int index) { 351 return supportedCompressions_.get(index); 352 } 353 354 private int supportedCompressionsMemoizedSerializedSize; 355 356 private byte memoizedIsInitialized = -1; 357 358 @java.lang.Override isInitialized()359 public final boolean isInitialized() { 360 byte isInitialized = memoizedIsInitialized; 361 if (isInitialized == 1) return true; 362 if (isInitialized == 0) return false; 363 364 memoizedIsInitialized = 1; 365 return true; 366 } 367 368 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)369 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 370 getSerializedSize(); 371 if (maxDiffEntries_ != 0) { 372 output.writeInt32(1, maxDiffEntries_); 373 } 374 if (maxDatabaseEntries_ != 0) { 375 output.writeInt32(2, maxDatabaseEntries_); 376 } 377 if (getSupportedCompressionsList().size() > 0) { 378 output.writeUInt32NoTag(26); 379 output.writeUInt32NoTag(supportedCompressionsMemoizedSerializedSize); 380 } 381 for (int i = 0; i < supportedCompressions_.size(); i++) { 382 output.writeEnumNoTag(supportedCompressions_.get(i)); 383 } 384 getUnknownFields().writeTo(output); 385 } 386 387 @java.lang.Override getSerializedSize()388 public int getSerializedSize() { 389 int size = memoizedSize; 390 if (size != -1) return size; 391 392 size = 0; 393 if (maxDiffEntries_ != 0) { 394 size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxDiffEntries_); 395 } 396 if (maxDatabaseEntries_ != 0) { 397 size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxDatabaseEntries_); 398 } 399 { 400 int dataSize = 0; 401 for (int i = 0; i < supportedCompressions_.size(); i++) { 402 dataSize += 403 com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( 404 supportedCompressions_.get(i)); 405 } 406 size += dataSize; 407 if (!getSupportedCompressionsList().isEmpty()) { 408 size += 1; 409 size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); 410 } 411 supportedCompressionsMemoizedSerializedSize = dataSize; 412 } 413 size += getUnknownFields().getSerializedSize(); 414 memoizedSize = size; 415 return size; 416 } 417 418 @java.lang.Override equals(final java.lang.Object obj)419 public boolean equals(final java.lang.Object obj) { 420 if (obj == this) { 421 return true; 422 } 423 if (!(obj instanceof com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints)) { 424 return super.equals(obj); 425 } 426 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints other = 427 (com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints) obj; 428 429 if (getMaxDiffEntries() != other.getMaxDiffEntries()) return false; 430 if (getMaxDatabaseEntries() != other.getMaxDatabaseEntries()) return false; 431 if (!supportedCompressions_.equals(other.supportedCompressions_)) return false; 432 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 433 return true; 434 } 435 436 @java.lang.Override hashCode()437 public int hashCode() { 438 if (memoizedHashCode != 0) { 439 return memoizedHashCode; 440 } 441 int hash = 41; 442 hash = (19 * hash) + getDescriptor().hashCode(); 443 hash = (37 * hash) + MAX_DIFF_ENTRIES_FIELD_NUMBER; 444 hash = (53 * hash) + getMaxDiffEntries(); 445 hash = (37 * hash) + MAX_DATABASE_ENTRIES_FIELD_NUMBER; 446 hash = (53 * hash) + getMaxDatabaseEntries(); 447 if (getSupportedCompressionsCount() > 0) { 448 hash = (37 * hash) + SUPPORTED_COMPRESSIONS_FIELD_NUMBER; 449 hash = (53 * hash) + supportedCompressions_.hashCode(); 450 } 451 hash = (29 * hash) + getUnknownFields().hashCode(); 452 memoizedHashCode = hash; 453 return hash; 454 } 455 parseFrom( java.nio.ByteBuffer data)456 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 457 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 458 return PARSER.parseFrom(data); 459 } 460 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)461 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 462 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 463 throws com.google.protobuf.InvalidProtocolBufferException { 464 return PARSER.parseFrom(data, extensionRegistry); 465 } 466 parseFrom( com.google.protobuf.ByteString data)467 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 468 com.google.protobuf.ByteString data) 469 throws com.google.protobuf.InvalidProtocolBufferException { 470 return PARSER.parseFrom(data); 471 } 472 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)473 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 474 com.google.protobuf.ByteString data, 475 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 476 throws com.google.protobuf.InvalidProtocolBufferException { 477 return PARSER.parseFrom(data, extensionRegistry); 478 } 479 parseFrom( byte[] data)480 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 481 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 482 return PARSER.parseFrom(data); 483 } 484 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)485 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 486 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 487 throws com.google.protobuf.InvalidProtocolBufferException { 488 return PARSER.parseFrom(data, extensionRegistry); 489 } 490 parseFrom( java.io.InputStream input)491 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 492 java.io.InputStream input) throws java.io.IOException { 493 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 494 } 495 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)496 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 497 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 498 throws java.io.IOException { 499 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 500 PARSER, input, extensionRegistry); 501 } 502 parseDelimitedFrom( java.io.InputStream input)503 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseDelimitedFrom( 504 java.io.InputStream input) throws java.io.IOException { 505 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 506 } 507 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)508 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseDelimitedFrom( 509 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 510 throws java.io.IOException { 511 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 512 PARSER, input, extensionRegistry); 513 } 514 parseFrom( com.google.protobuf.CodedInputStream input)515 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 516 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 517 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 518 } 519 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)520 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints parseFrom( 521 com.google.protobuf.CodedInputStream input, 522 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 523 throws java.io.IOException { 524 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 525 PARSER, input, extensionRegistry); 526 } 527 528 @java.lang.Override newBuilderForType()529 public Builder newBuilderForType() { 530 return newBuilder(); 531 } 532 newBuilder()533 public static Builder newBuilder() { 534 return DEFAULT_INSTANCE.toBuilder(); 535 } 536 newBuilder( com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints prototype)537 public static Builder newBuilder( 538 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints prototype) { 539 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 540 } 541 542 @java.lang.Override toBuilder()543 public Builder toBuilder() { 544 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 545 } 546 547 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)548 protected Builder newBuilderForType( 549 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 550 Builder builder = new Builder(parent); 551 return builder; 552 } 553 /** 554 * 555 * 556 * <pre> 557 * The constraints for this diff. 558 * </pre> 559 * 560 * Protobuf type {@code google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints} 561 */ 562 public static final class Builder 563 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 564 implements 565 // @@protoc_insertion_point(builder_implements:google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints) 566 com.google.webrisk.v1.ComputeThreatListDiffRequest.ConstraintsOrBuilder { getDescriptor()567 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 568 return com.google.webrisk.v1.WebRiskProto 569 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_Constraints_descriptor; 570 } 571 572 @java.lang.Override 573 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()574 internalGetFieldAccessorTable() { 575 return com.google.webrisk.v1.WebRiskProto 576 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_Constraints_fieldAccessorTable 577 .ensureFieldAccessorsInitialized( 578 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.class, 579 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.Builder.class); 580 } 581 582 // Construct using com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.newBuilder() Builder()583 private Builder() {} 584 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)585 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 586 super(parent); 587 } 588 589 @java.lang.Override clear()590 public Builder clear() { 591 super.clear(); 592 bitField0_ = 0; 593 maxDiffEntries_ = 0; 594 maxDatabaseEntries_ = 0; 595 supportedCompressions_ = java.util.Collections.emptyList(); 596 bitField0_ = (bitField0_ & ~0x00000004); 597 return this; 598 } 599 600 @java.lang.Override getDescriptorForType()601 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 602 return com.google.webrisk.v1.WebRiskProto 603 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_Constraints_descriptor; 604 } 605 606 @java.lang.Override 607 public com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints getDefaultInstanceForType()608 getDefaultInstanceForType() { 609 return com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.getDefaultInstance(); 610 } 611 612 @java.lang.Override build()613 public com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints build() { 614 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints result = buildPartial(); 615 if (!result.isInitialized()) { 616 throw newUninitializedMessageException(result); 617 } 618 return result; 619 } 620 621 @java.lang.Override buildPartial()622 public com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints buildPartial() { 623 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints result = 624 new com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints(this); 625 buildPartialRepeatedFields(result); 626 if (bitField0_ != 0) { 627 buildPartial0(result); 628 } 629 onBuilt(); 630 return result; 631 } 632 buildPartialRepeatedFields( com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints result)633 private void buildPartialRepeatedFields( 634 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints result) { 635 if (((bitField0_ & 0x00000004) != 0)) { 636 supportedCompressions_ = java.util.Collections.unmodifiableList(supportedCompressions_); 637 bitField0_ = (bitField0_ & ~0x00000004); 638 } 639 result.supportedCompressions_ = supportedCompressions_; 640 } 641 buildPartial0( com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints result)642 private void buildPartial0( 643 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints result) { 644 int from_bitField0_ = bitField0_; 645 if (((from_bitField0_ & 0x00000001) != 0)) { 646 result.maxDiffEntries_ = maxDiffEntries_; 647 } 648 if (((from_bitField0_ & 0x00000002) != 0)) { 649 result.maxDatabaseEntries_ = maxDatabaseEntries_; 650 } 651 } 652 653 @java.lang.Override clone()654 public Builder clone() { 655 return super.clone(); 656 } 657 658 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)659 public Builder setField( 660 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 661 return super.setField(field, value); 662 } 663 664 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)665 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 666 return super.clearField(field); 667 } 668 669 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)670 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 671 return super.clearOneof(oneof); 672 } 673 674 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)675 public Builder setRepeatedField( 676 com.google.protobuf.Descriptors.FieldDescriptor field, 677 int index, 678 java.lang.Object value) { 679 return super.setRepeatedField(field, index, value); 680 } 681 682 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)683 public Builder addRepeatedField( 684 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 685 return super.addRepeatedField(field, value); 686 } 687 688 @java.lang.Override mergeFrom(com.google.protobuf.Message other)689 public Builder mergeFrom(com.google.protobuf.Message other) { 690 if (other instanceof com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints) { 691 return mergeFrom((com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints) other); 692 } else { 693 super.mergeFrom(other); 694 return this; 695 } 696 } 697 mergeFrom( com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints other)698 public Builder mergeFrom( 699 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints other) { 700 if (other 701 == com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.getDefaultInstance()) 702 return this; 703 if (other.getMaxDiffEntries() != 0) { 704 setMaxDiffEntries(other.getMaxDiffEntries()); 705 } 706 if (other.getMaxDatabaseEntries() != 0) { 707 setMaxDatabaseEntries(other.getMaxDatabaseEntries()); 708 } 709 if (!other.supportedCompressions_.isEmpty()) { 710 if (supportedCompressions_.isEmpty()) { 711 supportedCompressions_ = other.supportedCompressions_; 712 bitField0_ = (bitField0_ & ~0x00000004); 713 } else { 714 ensureSupportedCompressionsIsMutable(); 715 supportedCompressions_.addAll(other.supportedCompressions_); 716 } 717 onChanged(); 718 } 719 this.mergeUnknownFields(other.getUnknownFields()); 720 onChanged(); 721 return this; 722 } 723 724 @java.lang.Override isInitialized()725 public final boolean isInitialized() { 726 return true; 727 } 728 729 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)730 public Builder mergeFrom( 731 com.google.protobuf.CodedInputStream input, 732 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 733 throws java.io.IOException { 734 if (extensionRegistry == null) { 735 throw new java.lang.NullPointerException(); 736 } 737 try { 738 boolean done = false; 739 while (!done) { 740 int tag = input.readTag(); 741 switch (tag) { 742 case 0: 743 done = true; 744 break; 745 case 8: 746 { 747 maxDiffEntries_ = input.readInt32(); 748 bitField0_ |= 0x00000001; 749 break; 750 } // case 8 751 case 16: 752 { 753 maxDatabaseEntries_ = input.readInt32(); 754 bitField0_ |= 0x00000002; 755 break; 756 } // case 16 757 case 24: 758 { 759 int tmpRaw = input.readEnum(); 760 ensureSupportedCompressionsIsMutable(); 761 supportedCompressions_.add(tmpRaw); 762 break; 763 } // case 24 764 case 26: 765 { 766 int length = input.readRawVarint32(); 767 int oldLimit = input.pushLimit(length); 768 while (input.getBytesUntilLimit() > 0) { 769 int tmpRaw = input.readEnum(); 770 ensureSupportedCompressionsIsMutable(); 771 supportedCompressions_.add(tmpRaw); 772 } 773 input.popLimit(oldLimit); 774 break; 775 } // case 26 776 default: 777 { 778 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 779 done = true; // was an endgroup tag 780 } 781 break; 782 } // default: 783 } // switch (tag) 784 } // while (!done) 785 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 786 throw e.unwrapIOException(); 787 } finally { 788 onChanged(); 789 } // finally 790 return this; 791 } 792 793 private int bitField0_; 794 795 private int maxDiffEntries_; 796 /** 797 * 798 * 799 * <pre> 800 * The maximum size in number of entries. The diff will not contain more 801 * entries than this value. This should be a power of 2 between 2**10 and 802 * 2**20. If zero, no diff size limit is set. 803 * </pre> 804 * 805 * <code>int32 max_diff_entries = 1;</code> 806 * 807 * @return The maxDiffEntries. 808 */ 809 @java.lang.Override getMaxDiffEntries()810 public int getMaxDiffEntries() { 811 return maxDiffEntries_; 812 } 813 /** 814 * 815 * 816 * <pre> 817 * The maximum size in number of entries. The diff will not contain more 818 * entries than this value. This should be a power of 2 between 2**10 and 819 * 2**20. If zero, no diff size limit is set. 820 * </pre> 821 * 822 * <code>int32 max_diff_entries = 1;</code> 823 * 824 * @param value The maxDiffEntries to set. 825 * @return This builder for chaining. 826 */ setMaxDiffEntries(int value)827 public Builder setMaxDiffEntries(int value) { 828 829 maxDiffEntries_ = value; 830 bitField0_ |= 0x00000001; 831 onChanged(); 832 return this; 833 } 834 /** 835 * 836 * 837 * <pre> 838 * The maximum size in number of entries. The diff will not contain more 839 * entries than this value. This should be a power of 2 between 2**10 and 840 * 2**20. If zero, no diff size limit is set. 841 * </pre> 842 * 843 * <code>int32 max_diff_entries = 1;</code> 844 * 845 * @return This builder for chaining. 846 */ clearMaxDiffEntries()847 public Builder clearMaxDiffEntries() { 848 bitField0_ = (bitField0_ & ~0x00000001); 849 maxDiffEntries_ = 0; 850 onChanged(); 851 return this; 852 } 853 854 private int maxDatabaseEntries_; 855 /** 856 * 857 * 858 * <pre> 859 * Sets the maximum number of entries that the client is willing to have 860 * in the local database. This should be a power of 2 between 2**10 and 861 * 2**20. If zero, no database size limit is set. 862 * </pre> 863 * 864 * <code>int32 max_database_entries = 2;</code> 865 * 866 * @return The maxDatabaseEntries. 867 */ 868 @java.lang.Override getMaxDatabaseEntries()869 public int getMaxDatabaseEntries() { 870 return maxDatabaseEntries_; 871 } 872 /** 873 * 874 * 875 * <pre> 876 * Sets the maximum number of entries that the client is willing to have 877 * in the local database. This should be a power of 2 between 2**10 and 878 * 2**20. If zero, no database size limit is set. 879 * </pre> 880 * 881 * <code>int32 max_database_entries = 2;</code> 882 * 883 * @param value The maxDatabaseEntries to set. 884 * @return This builder for chaining. 885 */ setMaxDatabaseEntries(int value)886 public Builder setMaxDatabaseEntries(int value) { 887 888 maxDatabaseEntries_ = value; 889 bitField0_ |= 0x00000002; 890 onChanged(); 891 return this; 892 } 893 /** 894 * 895 * 896 * <pre> 897 * Sets the maximum number of entries that the client is willing to have 898 * in the local database. This should be a power of 2 between 2**10 and 899 * 2**20. If zero, no database size limit is set. 900 * </pre> 901 * 902 * <code>int32 max_database_entries = 2;</code> 903 * 904 * @return This builder for chaining. 905 */ clearMaxDatabaseEntries()906 public Builder clearMaxDatabaseEntries() { 907 bitField0_ = (bitField0_ & ~0x00000002); 908 maxDatabaseEntries_ = 0; 909 onChanged(); 910 return this; 911 } 912 913 private java.util.List<java.lang.Integer> supportedCompressions_ = 914 java.util.Collections.emptyList(); 915 ensureSupportedCompressionsIsMutable()916 private void ensureSupportedCompressionsIsMutable() { 917 if (!((bitField0_ & 0x00000004) != 0)) { 918 supportedCompressions_ = 919 new java.util.ArrayList<java.lang.Integer>(supportedCompressions_); 920 bitField0_ |= 0x00000004; 921 } 922 } 923 /** 924 * 925 * 926 * <pre> 927 * The compression types supported by the client. 928 * </pre> 929 * 930 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 931 * 932 * @return A list containing the supportedCompressions. 933 */ getSupportedCompressionsList()934 public java.util.List<com.google.webrisk.v1.CompressionType> getSupportedCompressionsList() { 935 return new com.google.protobuf.Internal.ListAdapter< 936 java.lang.Integer, com.google.webrisk.v1.CompressionType>( 937 supportedCompressions_, supportedCompressions_converter_); 938 } 939 /** 940 * 941 * 942 * <pre> 943 * The compression types supported by the client. 944 * </pre> 945 * 946 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 947 * 948 * @return The count of supportedCompressions. 949 */ getSupportedCompressionsCount()950 public int getSupportedCompressionsCount() { 951 return supportedCompressions_.size(); 952 } 953 /** 954 * 955 * 956 * <pre> 957 * The compression types supported by the client. 958 * </pre> 959 * 960 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 961 * 962 * @param index The index of the element to return. 963 * @return The supportedCompressions at the given index. 964 */ getSupportedCompressions(int index)965 public com.google.webrisk.v1.CompressionType getSupportedCompressions(int index) { 966 return supportedCompressions_converter_.convert(supportedCompressions_.get(index)); 967 } 968 /** 969 * 970 * 971 * <pre> 972 * The compression types supported by the client. 973 * </pre> 974 * 975 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 976 * 977 * @param index The index to set the value at. 978 * @param value The supportedCompressions to set. 979 * @return This builder for chaining. 980 */ setSupportedCompressions( int index, com.google.webrisk.v1.CompressionType value)981 public Builder setSupportedCompressions( 982 int index, com.google.webrisk.v1.CompressionType value) { 983 if (value == null) { 984 throw new NullPointerException(); 985 } 986 ensureSupportedCompressionsIsMutable(); 987 supportedCompressions_.set(index, value.getNumber()); 988 onChanged(); 989 return this; 990 } 991 /** 992 * 993 * 994 * <pre> 995 * The compression types supported by the client. 996 * </pre> 997 * 998 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 999 * 1000 * @param value The supportedCompressions to add. 1001 * @return This builder for chaining. 1002 */ addSupportedCompressions(com.google.webrisk.v1.CompressionType value)1003 public Builder addSupportedCompressions(com.google.webrisk.v1.CompressionType value) { 1004 if (value == null) { 1005 throw new NullPointerException(); 1006 } 1007 ensureSupportedCompressionsIsMutable(); 1008 supportedCompressions_.add(value.getNumber()); 1009 onChanged(); 1010 return this; 1011 } 1012 /** 1013 * 1014 * 1015 * <pre> 1016 * The compression types supported by the client. 1017 * </pre> 1018 * 1019 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 1020 * 1021 * @param values The supportedCompressions to add. 1022 * @return This builder for chaining. 1023 */ addAllSupportedCompressions( java.lang.Iterable<? extends com.google.webrisk.v1.CompressionType> values)1024 public Builder addAllSupportedCompressions( 1025 java.lang.Iterable<? extends com.google.webrisk.v1.CompressionType> values) { 1026 ensureSupportedCompressionsIsMutable(); 1027 for (com.google.webrisk.v1.CompressionType value : values) { 1028 supportedCompressions_.add(value.getNumber()); 1029 } 1030 onChanged(); 1031 return this; 1032 } 1033 /** 1034 * 1035 * 1036 * <pre> 1037 * The compression types supported by the client. 1038 * </pre> 1039 * 1040 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 1041 * 1042 * @return This builder for chaining. 1043 */ clearSupportedCompressions()1044 public Builder clearSupportedCompressions() { 1045 supportedCompressions_ = java.util.Collections.emptyList(); 1046 bitField0_ = (bitField0_ & ~0x00000004); 1047 onChanged(); 1048 return this; 1049 } 1050 /** 1051 * 1052 * 1053 * <pre> 1054 * The compression types supported by the client. 1055 * </pre> 1056 * 1057 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 1058 * 1059 * @return A list containing the enum numeric values on the wire for supportedCompressions. 1060 */ getSupportedCompressionsValueList()1061 public java.util.List<java.lang.Integer> getSupportedCompressionsValueList() { 1062 return java.util.Collections.unmodifiableList(supportedCompressions_); 1063 } 1064 /** 1065 * 1066 * 1067 * <pre> 1068 * The compression types supported by the client. 1069 * </pre> 1070 * 1071 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 1072 * 1073 * @param index The index of the value to return. 1074 * @return The enum numeric value on the wire of supportedCompressions at the given index. 1075 */ getSupportedCompressionsValue(int index)1076 public int getSupportedCompressionsValue(int index) { 1077 return supportedCompressions_.get(index); 1078 } 1079 /** 1080 * 1081 * 1082 * <pre> 1083 * The compression types supported by the client. 1084 * </pre> 1085 * 1086 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 1087 * 1088 * @param index The index to set the value at. 1089 * @param value The enum numeric value on the wire for supportedCompressions to set. 1090 * @return This builder for chaining. 1091 */ setSupportedCompressionsValue(int index, int value)1092 public Builder setSupportedCompressionsValue(int index, int value) { 1093 ensureSupportedCompressionsIsMutable(); 1094 supportedCompressions_.set(index, value); 1095 onChanged(); 1096 return this; 1097 } 1098 /** 1099 * 1100 * 1101 * <pre> 1102 * The compression types supported by the client. 1103 * </pre> 1104 * 1105 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 1106 * 1107 * @param value The enum numeric value on the wire for supportedCompressions to add. 1108 * @return This builder for chaining. 1109 */ addSupportedCompressionsValue(int value)1110 public Builder addSupportedCompressionsValue(int value) { 1111 ensureSupportedCompressionsIsMutable(); 1112 supportedCompressions_.add(value); 1113 onChanged(); 1114 return this; 1115 } 1116 /** 1117 * 1118 * 1119 * <pre> 1120 * The compression types supported by the client. 1121 * </pre> 1122 * 1123 * <code>repeated .google.cloud.webrisk.v1.CompressionType supported_compressions = 3;</code> 1124 * 1125 * @param values The enum numeric values on the wire for supportedCompressions to add. 1126 * @return This builder for chaining. 1127 */ addAllSupportedCompressionsValue( java.lang.Iterable<java.lang.Integer> values)1128 public Builder addAllSupportedCompressionsValue( 1129 java.lang.Iterable<java.lang.Integer> values) { 1130 ensureSupportedCompressionsIsMutable(); 1131 for (int value : values) { 1132 supportedCompressions_.add(value); 1133 } 1134 onChanged(); 1135 return this; 1136 } 1137 1138 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1139 public final Builder setUnknownFields( 1140 final com.google.protobuf.UnknownFieldSet unknownFields) { 1141 return super.setUnknownFields(unknownFields); 1142 } 1143 1144 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1145 public final Builder mergeUnknownFields( 1146 final com.google.protobuf.UnknownFieldSet unknownFields) { 1147 return super.mergeUnknownFields(unknownFields); 1148 } 1149 1150 // @@protoc_insertion_point(builder_scope:google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints) 1151 } 1152 1153 // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints) 1154 private static final com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints 1155 DEFAULT_INSTANCE; 1156 1157 static { 1158 DEFAULT_INSTANCE = new com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints(); 1159 } 1160 1161 public static com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints getDefaultInstance()1162 getDefaultInstance() { 1163 return DEFAULT_INSTANCE; 1164 } 1165 1166 private static final com.google.protobuf.Parser<Constraints> PARSER = 1167 new com.google.protobuf.AbstractParser<Constraints>() { 1168 @java.lang.Override 1169 public Constraints parsePartialFrom( 1170 com.google.protobuf.CodedInputStream input, 1171 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1172 throws com.google.protobuf.InvalidProtocolBufferException { 1173 Builder builder = newBuilder(); 1174 try { 1175 builder.mergeFrom(input, extensionRegistry); 1176 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1177 throw e.setUnfinishedMessage(builder.buildPartial()); 1178 } catch (com.google.protobuf.UninitializedMessageException e) { 1179 throw e.asInvalidProtocolBufferException() 1180 .setUnfinishedMessage(builder.buildPartial()); 1181 } catch (java.io.IOException e) { 1182 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1183 .setUnfinishedMessage(builder.buildPartial()); 1184 } 1185 return builder.buildPartial(); 1186 } 1187 }; 1188 parser()1189 public static com.google.protobuf.Parser<Constraints> parser() { 1190 return PARSER; 1191 } 1192 1193 @java.lang.Override getParserForType()1194 public com.google.protobuf.Parser<Constraints> getParserForType() { 1195 return PARSER; 1196 } 1197 1198 @java.lang.Override 1199 public com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints getDefaultInstanceForType()1200 getDefaultInstanceForType() { 1201 return DEFAULT_INSTANCE; 1202 } 1203 } 1204 1205 public static final int THREAT_TYPE_FIELD_NUMBER = 1; 1206 private int threatType_ = 0; 1207 /** 1208 * 1209 * 1210 * <pre> 1211 * Required. The threat list to update. Only a single ThreatType should be specified 1212 * per request. If you want to handle multiple ThreatTypes, you must make one 1213 * request per ThreatType. 1214 * </pre> 1215 * 1216 * <code> 1217 * .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; 1218 * </code> 1219 * 1220 * @return The enum numeric value on the wire for threatType. 1221 */ 1222 @java.lang.Override getThreatTypeValue()1223 public int getThreatTypeValue() { 1224 return threatType_; 1225 } 1226 /** 1227 * 1228 * 1229 * <pre> 1230 * Required. The threat list to update. Only a single ThreatType should be specified 1231 * per request. If you want to handle multiple ThreatTypes, you must make one 1232 * request per ThreatType. 1233 * </pre> 1234 * 1235 * <code> 1236 * .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; 1237 * </code> 1238 * 1239 * @return The threatType. 1240 */ 1241 @java.lang.Override getThreatType()1242 public com.google.webrisk.v1.ThreatType getThreatType() { 1243 com.google.webrisk.v1.ThreatType result = 1244 com.google.webrisk.v1.ThreatType.forNumber(threatType_); 1245 return result == null ? com.google.webrisk.v1.ThreatType.UNRECOGNIZED : result; 1246 } 1247 1248 public static final int VERSION_TOKEN_FIELD_NUMBER = 2; 1249 private com.google.protobuf.ByteString versionToken_ = com.google.protobuf.ByteString.EMPTY; 1250 /** 1251 * 1252 * 1253 * <pre> 1254 * The current version token of the client for the requested list (the 1255 * client version that was received from the last successful diff). 1256 * If the client does not have a version token (this is the first time calling 1257 * ComputeThreatListDiff), this may be left empty and a full database 1258 * snapshot will be returned. 1259 * </pre> 1260 * 1261 * <code>bytes version_token = 2;</code> 1262 * 1263 * @return The versionToken. 1264 */ 1265 @java.lang.Override getVersionToken()1266 public com.google.protobuf.ByteString getVersionToken() { 1267 return versionToken_; 1268 } 1269 1270 public static final int CONSTRAINTS_FIELD_NUMBER = 3; 1271 private com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints_; 1272 /** 1273 * 1274 * 1275 * <pre> 1276 * Required. The constraints associated with this request. 1277 * </pre> 1278 * 1279 * <code> 1280 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 1281 * </code> 1282 * 1283 * @return Whether the constraints field is set. 1284 */ 1285 @java.lang.Override hasConstraints()1286 public boolean hasConstraints() { 1287 return constraints_ != null; 1288 } 1289 /** 1290 * 1291 * 1292 * <pre> 1293 * Required. The constraints associated with this request. 1294 * </pre> 1295 * 1296 * <code> 1297 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 1298 * </code> 1299 * 1300 * @return The constraints. 1301 */ 1302 @java.lang.Override getConstraints()1303 public com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints getConstraints() { 1304 return constraints_ == null 1305 ? com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.getDefaultInstance() 1306 : constraints_; 1307 } 1308 /** 1309 * 1310 * 1311 * <pre> 1312 * Required. The constraints associated with this request. 1313 * </pre> 1314 * 1315 * <code> 1316 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 1317 * </code> 1318 */ 1319 @java.lang.Override 1320 public com.google.webrisk.v1.ComputeThreatListDiffRequest.ConstraintsOrBuilder getConstraintsOrBuilder()1321 getConstraintsOrBuilder() { 1322 return constraints_ == null 1323 ? com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.getDefaultInstance() 1324 : constraints_; 1325 } 1326 1327 private byte memoizedIsInitialized = -1; 1328 1329 @java.lang.Override isInitialized()1330 public final boolean isInitialized() { 1331 byte isInitialized = memoizedIsInitialized; 1332 if (isInitialized == 1) return true; 1333 if (isInitialized == 0) return false; 1334 1335 memoizedIsInitialized = 1; 1336 return true; 1337 } 1338 1339 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1340 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1341 if (threatType_ != com.google.webrisk.v1.ThreatType.THREAT_TYPE_UNSPECIFIED.getNumber()) { 1342 output.writeEnum(1, threatType_); 1343 } 1344 if (!versionToken_.isEmpty()) { 1345 output.writeBytes(2, versionToken_); 1346 } 1347 if (constraints_ != null) { 1348 output.writeMessage(3, getConstraints()); 1349 } 1350 getUnknownFields().writeTo(output); 1351 } 1352 1353 @java.lang.Override getSerializedSize()1354 public int getSerializedSize() { 1355 int size = memoizedSize; 1356 if (size != -1) return size; 1357 1358 size = 0; 1359 if (threatType_ != com.google.webrisk.v1.ThreatType.THREAT_TYPE_UNSPECIFIED.getNumber()) { 1360 size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, threatType_); 1361 } 1362 if (!versionToken_.isEmpty()) { 1363 size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, versionToken_); 1364 } 1365 if (constraints_ != null) { 1366 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConstraints()); 1367 } 1368 size += getUnknownFields().getSerializedSize(); 1369 memoizedSize = size; 1370 return size; 1371 } 1372 1373 @java.lang.Override equals(final java.lang.Object obj)1374 public boolean equals(final java.lang.Object obj) { 1375 if (obj == this) { 1376 return true; 1377 } 1378 if (!(obj instanceof com.google.webrisk.v1.ComputeThreatListDiffRequest)) { 1379 return super.equals(obj); 1380 } 1381 com.google.webrisk.v1.ComputeThreatListDiffRequest other = 1382 (com.google.webrisk.v1.ComputeThreatListDiffRequest) obj; 1383 1384 if (threatType_ != other.threatType_) return false; 1385 if (!getVersionToken().equals(other.getVersionToken())) return false; 1386 if (hasConstraints() != other.hasConstraints()) return false; 1387 if (hasConstraints()) { 1388 if (!getConstraints().equals(other.getConstraints())) return false; 1389 } 1390 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1391 return true; 1392 } 1393 1394 @java.lang.Override hashCode()1395 public int hashCode() { 1396 if (memoizedHashCode != 0) { 1397 return memoizedHashCode; 1398 } 1399 int hash = 41; 1400 hash = (19 * hash) + getDescriptor().hashCode(); 1401 hash = (37 * hash) + THREAT_TYPE_FIELD_NUMBER; 1402 hash = (53 * hash) + threatType_; 1403 hash = (37 * hash) + VERSION_TOKEN_FIELD_NUMBER; 1404 hash = (53 * hash) + getVersionToken().hashCode(); 1405 if (hasConstraints()) { 1406 hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER; 1407 hash = (53 * hash) + getConstraints().hashCode(); 1408 } 1409 hash = (29 * hash) + getUnknownFields().hashCode(); 1410 memoizedHashCode = hash; 1411 return hash; 1412 } 1413 parseFrom( java.nio.ByteBuffer data)1414 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom( 1415 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 1416 return PARSER.parseFrom(data); 1417 } 1418 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1419 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom( 1420 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1421 throws com.google.protobuf.InvalidProtocolBufferException { 1422 return PARSER.parseFrom(data, extensionRegistry); 1423 } 1424 parseFrom( com.google.protobuf.ByteString data)1425 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom( 1426 com.google.protobuf.ByteString data) 1427 throws com.google.protobuf.InvalidProtocolBufferException { 1428 return PARSER.parseFrom(data); 1429 } 1430 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1431 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom( 1432 com.google.protobuf.ByteString data, 1433 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1434 throws com.google.protobuf.InvalidProtocolBufferException { 1435 return PARSER.parseFrom(data, extensionRegistry); 1436 } 1437 parseFrom(byte[] data)1438 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom(byte[] data) 1439 throws com.google.protobuf.InvalidProtocolBufferException { 1440 return PARSER.parseFrom(data); 1441 } 1442 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1443 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom( 1444 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1445 throws com.google.protobuf.InvalidProtocolBufferException { 1446 return PARSER.parseFrom(data, extensionRegistry); 1447 } 1448 parseFrom( java.io.InputStream input)1449 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom( 1450 java.io.InputStream input) throws java.io.IOException { 1451 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1452 } 1453 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1454 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom( 1455 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1456 throws java.io.IOException { 1457 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1458 PARSER, input, extensionRegistry); 1459 } 1460 parseDelimitedFrom( java.io.InputStream input)1461 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseDelimitedFrom( 1462 java.io.InputStream input) throws java.io.IOException { 1463 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1464 } 1465 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1466 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseDelimitedFrom( 1467 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1468 throws java.io.IOException { 1469 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1470 PARSER, input, extensionRegistry); 1471 } 1472 parseFrom( com.google.protobuf.CodedInputStream input)1473 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom( 1474 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1475 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1476 } 1477 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1478 public static com.google.webrisk.v1.ComputeThreatListDiffRequest parseFrom( 1479 com.google.protobuf.CodedInputStream input, 1480 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1481 throws java.io.IOException { 1482 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1483 PARSER, input, extensionRegistry); 1484 } 1485 1486 @java.lang.Override newBuilderForType()1487 public Builder newBuilderForType() { 1488 return newBuilder(); 1489 } 1490 newBuilder()1491 public static Builder newBuilder() { 1492 return DEFAULT_INSTANCE.toBuilder(); 1493 } 1494 newBuilder(com.google.webrisk.v1.ComputeThreatListDiffRequest prototype)1495 public static Builder newBuilder(com.google.webrisk.v1.ComputeThreatListDiffRequest prototype) { 1496 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1497 } 1498 1499 @java.lang.Override toBuilder()1500 public Builder toBuilder() { 1501 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1502 } 1503 1504 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1505 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1506 Builder builder = new Builder(parent); 1507 return builder; 1508 } 1509 /** 1510 * 1511 * 1512 * <pre> 1513 * Describes an API diff request. 1514 * </pre> 1515 * 1516 * Protobuf type {@code google.cloud.webrisk.v1.ComputeThreatListDiffRequest} 1517 */ 1518 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1519 implements 1520 // @@protoc_insertion_point(builder_implements:google.cloud.webrisk.v1.ComputeThreatListDiffRequest) 1521 com.google.webrisk.v1.ComputeThreatListDiffRequestOrBuilder { getDescriptor()1522 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1523 return com.google.webrisk.v1.WebRiskProto 1524 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_descriptor; 1525 } 1526 1527 @java.lang.Override 1528 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1529 internalGetFieldAccessorTable() { 1530 return com.google.webrisk.v1.WebRiskProto 1531 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_fieldAccessorTable 1532 .ensureFieldAccessorsInitialized( 1533 com.google.webrisk.v1.ComputeThreatListDiffRequest.class, 1534 com.google.webrisk.v1.ComputeThreatListDiffRequest.Builder.class); 1535 } 1536 1537 // Construct using com.google.webrisk.v1.ComputeThreatListDiffRequest.newBuilder() Builder()1538 private Builder() {} 1539 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1540 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1541 super(parent); 1542 } 1543 1544 @java.lang.Override clear()1545 public Builder clear() { 1546 super.clear(); 1547 bitField0_ = 0; 1548 threatType_ = 0; 1549 versionToken_ = com.google.protobuf.ByteString.EMPTY; 1550 constraints_ = null; 1551 if (constraintsBuilder_ != null) { 1552 constraintsBuilder_.dispose(); 1553 constraintsBuilder_ = null; 1554 } 1555 return this; 1556 } 1557 1558 @java.lang.Override getDescriptorForType()1559 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1560 return com.google.webrisk.v1.WebRiskProto 1561 .internal_static_google_cloud_webrisk_v1_ComputeThreatListDiffRequest_descriptor; 1562 } 1563 1564 @java.lang.Override getDefaultInstanceForType()1565 public com.google.webrisk.v1.ComputeThreatListDiffRequest getDefaultInstanceForType() { 1566 return com.google.webrisk.v1.ComputeThreatListDiffRequest.getDefaultInstance(); 1567 } 1568 1569 @java.lang.Override build()1570 public com.google.webrisk.v1.ComputeThreatListDiffRequest build() { 1571 com.google.webrisk.v1.ComputeThreatListDiffRequest result = buildPartial(); 1572 if (!result.isInitialized()) { 1573 throw newUninitializedMessageException(result); 1574 } 1575 return result; 1576 } 1577 1578 @java.lang.Override buildPartial()1579 public com.google.webrisk.v1.ComputeThreatListDiffRequest buildPartial() { 1580 com.google.webrisk.v1.ComputeThreatListDiffRequest result = 1581 new com.google.webrisk.v1.ComputeThreatListDiffRequest(this); 1582 if (bitField0_ != 0) { 1583 buildPartial0(result); 1584 } 1585 onBuilt(); 1586 return result; 1587 } 1588 buildPartial0(com.google.webrisk.v1.ComputeThreatListDiffRequest result)1589 private void buildPartial0(com.google.webrisk.v1.ComputeThreatListDiffRequest result) { 1590 int from_bitField0_ = bitField0_; 1591 if (((from_bitField0_ & 0x00000001) != 0)) { 1592 result.threatType_ = threatType_; 1593 } 1594 if (((from_bitField0_ & 0x00000002) != 0)) { 1595 result.versionToken_ = versionToken_; 1596 } 1597 if (((from_bitField0_ & 0x00000004) != 0)) { 1598 result.constraints_ = 1599 constraintsBuilder_ == null ? constraints_ : constraintsBuilder_.build(); 1600 } 1601 } 1602 1603 @java.lang.Override clone()1604 public Builder clone() { 1605 return super.clone(); 1606 } 1607 1608 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1609 public Builder setField( 1610 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1611 return super.setField(field, value); 1612 } 1613 1614 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1615 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1616 return super.clearField(field); 1617 } 1618 1619 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1620 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1621 return super.clearOneof(oneof); 1622 } 1623 1624 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1625 public Builder setRepeatedField( 1626 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1627 return super.setRepeatedField(field, index, value); 1628 } 1629 1630 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1631 public Builder addRepeatedField( 1632 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1633 return super.addRepeatedField(field, value); 1634 } 1635 1636 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1637 public Builder mergeFrom(com.google.protobuf.Message other) { 1638 if (other instanceof com.google.webrisk.v1.ComputeThreatListDiffRequest) { 1639 return mergeFrom((com.google.webrisk.v1.ComputeThreatListDiffRequest) other); 1640 } else { 1641 super.mergeFrom(other); 1642 return this; 1643 } 1644 } 1645 mergeFrom(com.google.webrisk.v1.ComputeThreatListDiffRequest other)1646 public Builder mergeFrom(com.google.webrisk.v1.ComputeThreatListDiffRequest other) { 1647 if (other == com.google.webrisk.v1.ComputeThreatListDiffRequest.getDefaultInstance()) 1648 return this; 1649 if (other.threatType_ != 0) { 1650 setThreatTypeValue(other.getThreatTypeValue()); 1651 } 1652 if (other.getVersionToken() != com.google.protobuf.ByteString.EMPTY) { 1653 setVersionToken(other.getVersionToken()); 1654 } 1655 if (other.hasConstraints()) { 1656 mergeConstraints(other.getConstraints()); 1657 } 1658 this.mergeUnknownFields(other.getUnknownFields()); 1659 onChanged(); 1660 return this; 1661 } 1662 1663 @java.lang.Override isInitialized()1664 public final boolean isInitialized() { 1665 return true; 1666 } 1667 1668 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1669 public Builder mergeFrom( 1670 com.google.protobuf.CodedInputStream input, 1671 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1672 throws java.io.IOException { 1673 if (extensionRegistry == null) { 1674 throw new java.lang.NullPointerException(); 1675 } 1676 try { 1677 boolean done = false; 1678 while (!done) { 1679 int tag = input.readTag(); 1680 switch (tag) { 1681 case 0: 1682 done = true; 1683 break; 1684 case 8: 1685 { 1686 threatType_ = input.readEnum(); 1687 bitField0_ |= 0x00000001; 1688 break; 1689 } // case 8 1690 case 18: 1691 { 1692 versionToken_ = input.readBytes(); 1693 bitField0_ |= 0x00000002; 1694 break; 1695 } // case 18 1696 case 26: 1697 { 1698 input.readMessage(getConstraintsFieldBuilder().getBuilder(), extensionRegistry); 1699 bitField0_ |= 0x00000004; 1700 break; 1701 } // case 26 1702 default: 1703 { 1704 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1705 done = true; // was an endgroup tag 1706 } 1707 break; 1708 } // default: 1709 } // switch (tag) 1710 } // while (!done) 1711 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1712 throw e.unwrapIOException(); 1713 } finally { 1714 onChanged(); 1715 } // finally 1716 return this; 1717 } 1718 1719 private int bitField0_; 1720 1721 private int threatType_ = 0; 1722 /** 1723 * 1724 * 1725 * <pre> 1726 * Required. The threat list to update. Only a single ThreatType should be specified 1727 * per request. If you want to handle multiple ThreatTypes, you must make one 1728 * request per ThreatType. 1729 * </pre> 1730 * 1731 * <code> 1732 * .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; 1733 * </code> 1734 * 1735 * @return The enum numeric value on the wire for threatType. 1736 */ 1737 @java.lang.Override getThreatTypeValue()1738 public int getThreatTypeValue() { 1739 return threatType_; 1740 } 1741 /** 1742 * 1743 * 1744 * <pre> 1745 * Required. The threat list to update. Only a single ThreatType should be specified 1746 * per request. If you want to handle multiple ThreatTypes, you must make one 1747 * request per ThreatType. 1748 * </pre> 1749 * 1750 * <code> 1751 * .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; 1752 * </code> 1753 * 1754 * @param value The enum numeric value on the wire for threatType to set. 1755 * @return This builder for chaining. 1756 */ setThreatTypeValue(int value)1757 public Builder setThreatTypeValue(int value) { 1758 threatType_ = value; 1759 bitField0_ |= 0x00000001; 1760 onChanged(); 1761 return this; 1762 } 1763 /** 1764 * 1765 * 1766 * <pre> 1767 * Required. The threat list to update. Only a single ThreatType should be specified 1768 * per request. If you want to handle multiple ThreatTypes, you must make one 1769 * request per ThreatType. 1770 * </pre> 1771 * 1772 * <code> 1773 * .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; 1774 * </code> 1775 * 1776 * @return The threatType. 1777 */ 1778 @java.lang.Override getThreatType()1779 public com.google.webrisk.v1.ThreatType getThreatType() { 1780 com.google.webrisk.v1.ThreatType result = 1781 com.google.webrisk.v1.ThreatType.forNumber(threatType_); 1782 return result == null ? com.google.webrisk.v1.ThreatType.UNRECOGNIZED : result; 1783 } 1784 /** 1785 * 1786 * 1787 * <pre> 1788 * Required. The threat list to update. Only a single ThreatType should be specified 1789 * per request. If you want to handle multiple ThreatTypes, you must make one 1790 * request per ThreatType. 1791 * </pre> 1792 * 1793 * <code> 1794 * .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; 1795 * </code> 1796 * 1797 * @param value The threatType to set. 1798 * @return This builder for chaining. 1799 */ setThreatType(com.google.webrisk.v1.ThreatType value)1800 public Builder setThreatType(com.google.webrisk.v1.ThreatType value) { 1801 if (value == null) { 1802 throw new NullPointerException(); 1803 } 1804 bitField0_ |= 0x00000001; 1805 threatType_ = value.getNumber(); 1806 onChanged(); 1807 return this; 1808 } 1809 /** 1810 * 1811 * 1812 * <pre> 1813 * Required. The threat list to update. Only a single ThreatType should be specified 1814 * per request. If you want to handle multiple ThreatTypes, you must make one 1815 * request per ThreatType. 1816 * </pre> 1817 * 1818 * <code> 1819 * .google.cloud.webrisk.v1.ThreatType threat_type = 1 [(.google.api.field_behavior) = REQUIRED]; 1820 * </code> 1821 * 1822 * @return This builder for chaining. 1823 */ clearThreatType()1824 public Builder clearThreatType() { 1825 bitField0_ = (bitField0_ & ~0x00000001); 1826 threatType_ = 0; 1827 onChanged(); 1828 return this; 1829 } 1830 1831 private com.google.protobuf.ByteString versionToken_ = com.google.protobuf.ByteString.EMPTY; 1832 /** 1833 * 1834 * 1835 * <pre> 1836 * The current version token of the client for the requested list (the 1837 * client version that was received from the last successful diff). 1838 * If the client does not have a version token (this is the first time calling 1839 * ComputeThreatListDiff), this may be left empty and a full database 1840 * snapshot will be returned. 1841 * </pre> 1842 * 1843 * <code>bytes version_token = 2;</code> 1844 * 1845 * @return The versionToken. 1846 */ 1847 @java.lang.Override getVersionToken()1848 public com.google.protobuf.ByteString getVersionToken() { 1849 return versionToken_; 1850 } 1851 /** 1852 * 1853 * 1854 * <pre> 1855 * The current version token of the client for the requested list (the 1856 * client version that was received from the last successful diff). 1857 * If the client does not have a version token (this is the first time calling 1858 * ComputeThreatListDiff), this may be left empty and a full database 1859 * snapshot will be returned. 1860 * </pre> 1861 * 1862 * <code>bytes version_token = 2;</code> 1863 * 1864 * @param value The versionToken to set. 1865 * @return This builder for chaining. 1866 */ setVersionToken(com.google.protobuf.ByteString value)1867 public Builder setVersionToken(com.google.protobuf.ByteString value) { 1868 if (value == null) { 1869 throw new NullPointerException(); 1870 } 1871 versionToken_ = value; 1872 bitField0_ |= 0x00000002; 1873 onChanged(); 1874 return this; 1875 } 1876 /** 1877 * 1878 * 1879 * <pre> 1880 * The current version token of the client for the requested list (the 1881 * client version that was received from the last successful diff). 1882 * If the client does not have a version token (this is the first time calling 1883 * ComputeThreatListDiff), this may be left empty and a full database 1884 * snapshot will be returned. 1885 * </pre> 1886 * 1887 * <code>bytes version_token = 2;</code> 1888 * 1889 * @return This builder for chaining. 1890 */ clearVersionToken()1891 public Builder clearVersionToken() { 1892 bitField0_ = (bitField0_ & ~0x00000002); 1893 versionToken_ = getDefaultInstance().getVersionToken(); 1894 onChanged(); 1895 return this; 1896 } 1897 1898 private com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints_; 1899 private com.google.protobuf.SingleFieldBuilderV3< 1900 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints, 1901 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.Builder, 1902 com.google.webrisk.v1.ComputeThreatListDiffRequest.ConstraintsOrBuilder> 1903 constraintsBuilder_; 1904 /** 1905 * 1906 * 1907 * <pre> 1908 * Required. The constraints associated with this request. 1909 * </pre> 1910 * 1911 * <code> 1912 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 1913 * </code> 1914 * 1915 * @return Whether the constraints field is set. 1916 */ hasConstraints()1917 public boolean hasConstraints() { 1918 return ((bitField0_ & 0x00000004) != 0); 1919 } 1920 /** 1921 * 1922 * 1923 * <pre> 1924 * Required. The constraints associated with this request. 1925 * </pre> 1926 * 1927 * <code> 1928 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 1929 * </code> 1930 * 1931 * @return The constraints. 1932 */ getConstraints()1933 public com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints getConstraints() { 1934 if (constraintsBuilder_ == null) { 1935 return constraints_ == null 1936 ? com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.getDefaultInstance() 1937 : constraints_; 1938 } else { 1939 return constraintsBuilder_.getMessage(); 1940 } 1941 } 1942 /** 1943 * 1944 * 1945 * <pre> 1946 * Required. The constraints associated with this request. 1947 * </pre> 1948 * 1949 * <code> 1950 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 1951 * </code> 1952 */ setConstraints( com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints value)1953 public Builder setConstraints( 1954 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints value) { 1955 if (constraintsBuilder_ == null) { 1956 if (value == null) { 1957 throw new NullPointerException(); 1958 } 1959 constraints_ = value; 1960 } else { 1961 constraintsBuilder_.setMessage(value); 1962 } 1963 bitField0_ |= 0x00000004; 1964 onChanged(); 1965 return this; 1966 } 1967 /** 1968 * 1969 * 1970 * <pre> 1971 * Required. The constraints associated with this request. 1972 * </pre> 1973 * 1974 * <code> 1975 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 1976 * </code> 1977 */ setConstraints( com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.Builder builderForValue)1978 public Builder setConstraints( 1979 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.Builder builderForValue) { 1980 if (constraintsBuilder_ == null) { 1981 constraints_ = builderForValue.build(); 1982 } else { 1983 constraintsBuilder_.setMessage(builderForValue.build()); 1984 } 1985 bitField0_ |= 0x00000004; 1986 onChanged(); 1987 return this; 1988 } 1989 /** 1990 * 1991 * 1992 * <pre> 1993 * Required. The constraints associated with this request. 1994 * </pre> 1995 * 1996 * <code> 1997 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 1998 * </code> 1999 */ mergeConstraints( com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints value)2000 public Builder mergeConstraints( 2001 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints value) { 2002 if (constraintsBuilder_ == null) { 2003 if (((bitField0_ & 0x00000004) != 0) 2004 && constraints_ != null 2005 && constraints_ 2006 != com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints 2007 .getDefaultInstance()) { 2008 getConstraintsBuilder().mergeFrom(value); 2009 } else { 2010 constraints_ = value; 2011 } 2012 } else { 2013 constraintsBuilder_.mergeFrom(value); 2014 } 2015 bitField0_ |= 0x00000004; 2016 onChanged(); 2017 return this; 2018 } 2019 /** 2020 * 2021 * 2022 * <pre> 2023 * Required. The constraints associated with this request. 2024 * </pre> 2025 * 2026 * <code> 2027 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 2028 * </code> 2029 */ clearConstraints()2030 public Builder clearConstraints() { 2031 bitField0_ = (bitField0_ & ~0x00000004); 2032 constraints_ = null; 2033 if (constraintsBuilder_ != null) { 2034 constraintsBuilder_.dispose(); 2035 constraintsBuilder_ = null; 2036 } 2037 onChanged(); 2038 return this; 2039 } 2040 /** 2041 * 2042 * 2043 * <pre> 2044 * Required. The constraints associated with this request. 2045 * </pre> 2046 * 2047 * <code> 2048 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 2049 * </code> 2050 */ 2051 public com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.Builder getConstraintsBuilder()2052 getConstraintsBuilder() { 2053 bitField0_ |= 0x00000004; 2054 onChanged(); 2055 return getConstraintsFieldBuilder().getBuilder(); 2056 } 2057 /** 2058 * 2059 * 2060 * <pre> 2061 * Required. The constraints associated with this request. 2062 * </pre> 2063 * 2064 * <code> 2065 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 2066 * </code> 2067 */ 2068 public com.google.webrisk.v1.ComputeThreatListDiffRequest.ConstraintsOrBuilder getConstraintsOrBuilder()2069 getConstraintsOrBuilder() { 2070 if (constraintsBuilder_ != null) { 2071 return constraintsBuilder_.getMessageOrBuilder(); 2072 } else { 2073 return constraints_ == null 2074 ? com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.getDefaultInstance() 2075 : constraints_; 2076 } 2077 } 2078 /** 2079 * 2080 * 2081 * <pre> 2082 * Required. The constraints associated with this request. 2083 * </pre> 2084 * 2085 * <code> 2086 * .google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints constraints = 3 [(.google.api.field_behavior) = REQUIRED]; 2087 * </code> 2088 */ 2089 private com.google.protobuf.SingleFieldBuilderV3< 2090 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints, 2091 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.Builder, 2092 com.google.webrisk.v1.ComputeThreatListDiffRequest.ConstraintsOrBuilder> getConstraintsFieldBuilder()2093 getConstraintsFieldBuilder() { 2094 if (constraintsBuilder_ == null) { 2095 constraintsBuilder_ = 2096 new com.google.protobuf.SingleFieldBuilderV3< 2097 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints, 2098 com.google.webrisk.v1.ComputeThreatListDiffRequest.Constraints.Builder, 2099 com.google.webrisk.v1.ComputeThreatListDiffRequest.ConstraintsOrBuilder>( 2100 getConstraints(), getParentForChildren(), isClean()); 2101 constraints_ = null; 2102 } 2103 return constraintsBuilder_; 2104 } 2105 2106 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2107 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2108 return super.setUnknownFields(unknownFields); 2109 } 2110 2111 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2112 public final Builder mergeUnknownFields( 2113 final com.google.protobuf.UnknownFieldSet unknownFields) { 2114 return super.mergeUnknownFields(unknownFields); 2115 } 2116 2117 // @@protoc_insertion_point(builder_scope:google.cloud.webrisk.v1.ComputeThreatListDiffRequest) 2118 } 2119 2120 // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1.ComputeThreatListDiffRequest) 2121 private static final com.google.webrisk.v1.ComputeThreatListDiffRequest DEFAULT_INSTANCE; 2122 2123 static { 2124 DEFAULT_INSTANCE = new com.google.webrisk.v1.ComputeThreatListDiffRequest(); 2125 } 2126 getDefaultInstance()2127 public static com.google.webrisk.v1.ComputeThreatListDiffRequest getDefaultInstance() { 2128 return DEFAULT_INSTANCE; 2129 } 2130 2131 private static final com.google.protobuf.Parser<ComputeThreatListDiffRequest> PARSER = 2132 new com.google.protobuf.AbstractParser<ComputeThreatListDiffRequest>() { 2133 @java.lang.Override 2134 public ComputeThreatListDiffRequest parsePartialFrom( 2135 com.google.protobuf.CodedInputStream input, 2136 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2137 throws com.google.protobuf.InvalidProtocolBufferException { 2138 Builder builder = newBuilder(); 2139 try { 2140 builder.mergeFrom(input, extensionRegistry); 2141 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2142 throw e.setUnfinishedMessage(builder.buildPartial()); 2143 } catch (com.google.protobuf.UninitializedMessageException e) { 2144 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2145 } catch (java.io.IOException e) { 2146 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2147 .setUnfinishedMessage(builder.buildPartial()); 2148 } 2149 return builder.buildPartial(); 2150 } 2151 }; 2152 parser()2153 public static com.google.protobuf.Parser<ComputeThreatListDiffRequest> parser() { 2154 return PARSER; 2155 } 2156 2157 @java.lang.Override getParserForType()2158 public com.google.protobuf.Parser<ComputeThreatListDiffRequest> getParserForType() { 2159 return PARSER; 2160 } 2161 2162 @java.lang.Override getDefaultInstanceForType()2163 public com.google.webrisk.v1.ComputeThreatListDiffRequest getDefaultInstanceForType() { 2164 return DEFAULT_INSTANCE; 2165 } 2166 } 2167