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/documentai/v1/document_processor_service.proto 18 19 package com.google.cloud.documentai.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Response message for the process document method. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.documentai.v1.ProcessResponse} 29 */ 30 public final class ProcessResponse extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.documentai.v1.ProcessResponse) 33 ProcessResponseOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ProcessResponse.newBuilder() to construct. ProcessResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ProcessResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ProcessResponse()40 private ProcessResponse() {} 41 42 @java.lang.Override 43 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)44 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 45 return new ProcessResponse(); 46 } 47 48 @java.lang.Override getUnknownFields()49 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 50 return this.unknownFields; 51 } 52 getDescriptor()53 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 54 return com.google.cloud.documentai.v1.DocumentAiProcessorService 55 .internal_static_google_cloud_documentai_v1_ProcessResponse_descriptor; 56 } 57 58 @java.lang.Override 59 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()60 internalGetFieldAccessorTable() { 61 return com.google.cloud.documentai.v1.DocumentAiProcessorService 62 .internal_static_google_cloud_documentai_v1_ProcessResponse_fieldAccessorTable 63 .ensureFieldAccessorsInitialized( 64 com.google.cloud.documentai.v1.ProcessResponse.class, 65 com.google.cloud.documentai.v1.ProcessResponse.Builder.class); 66 } 67 68 public static final int DOCUMENT_FIELD_NUMBER = 1; 69 private com.google.cloud.documentai.v1.Document document_; 70 /** 71 * 72 * 73 * <pre> 74 * The document payload, will populate fields based on the processor's 75 * behavior. 76 * </pre> 77 * 78 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 79 * 80 * @return Whether the document field is set. 81 */ 82 @java.lang.Override hasDocument()83 public boolean hasDocument() { 84 return document_ != null; 85 } 86 /** 87 * 88 * 89 * <pre> 90 * The document payload, will populate fields based on the processor's 91 * behavior. 92 * </pre> 93 * 94 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 95 * 96 * @return The document. 97 */ 98 @java.lang.Override getDocument()99 public com.google.cloud.documentai.v1.Document getDocument() { 100 return document_ == null 101 ? com.google.cloud.documentai.v1.Document.getDefaultInstance() 102 : document_; 103 } 104 /** 105 * 106 * 107 * <pre> 108 * The document payload, will populate fields based on the processor's 109 * behavior. 110 * </pre> 111 * 112 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 113 */ 114 @java.lang.Override getDocumentOrBuilder()115 public com.google.cloud.documentai.v1.DocumentOrBuilder getDocumentOrBuilder() { 116 return document_ == null 117 ? com.google.cloud.documentai.v1.Document.getDefaultInstance() 118 : document_; 119 } 120 121 public static final int HUMAN_REVIEW_STATUS_FIELD_NUMBER = 3; 122 private com.google.cloud.documentai.v1.HumanReviewStatus humanReviewStatus_; 123 /** 124 * 125 * 126 * <pre> 127 * The status of human review on the processed document. 128 * </pre> 129 * 130 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 131 * 132 * @return Whether the humanReviewStatus field is set. 133 */ 134 @java.lang.Override hasHumanReviewStatus()135 public boolean hasHumanReviewStatus() { 136 return humanReviewStatus_ != null; 137 } 138 /** 139 * 140 * 141 * <pre> 142 * The status of human review on the processed document. 143 * </pre> 144 * 145 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 146 * 147 * @return The humanReviewStatus. 148 */ 149 @java.lang.Override getHumanReviewStatus()150 public com.google.cloud.documentai.v1.HumanReviewStatus getHumanReviewStatus() { 151 return humanReviewStatus_ == null 152 ? com.google.cloud.documentai.v1.HumanReviewStatus.getDefaultInstance() 153 : humanReviewStatus_; 154 } 155 /** 156 * 157 * 158 * <pre> 159 * The status of human review on the processed document. 160 * </pre> 161 * 162 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 163 */ 164 @java.lang.Override getHumanReviewStatusOrBuilder()165 public com.google.cloud.documentai.v1.HumanReviewStatusOrBuilder getHumanReviewStatusOrBuilder() { 166 return humanReviewStatus_ == null 167 ? com.google.cloud.documentai.v1.HumanReviewStatus.getDefaultInstance() 168 : humanReviewStatus_; 169 } 170 171 private byte memoizedIsInitialized = -1; 172 173 @java.lang.Override isInitialized()174 public final boolean isInitialized() { 175 byte isInitialized = memoizedIsInitialized; 176 if (isInitialized == 1) return true; 177 if (isInitialized == 0) return false; 178 179 memoizedIsInitialized = 1; 180 return true; 181 } 182 183 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)184 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 185 if (document_ != null) { 186 output.writeMessage(1, getDocument()); 187 } 188 if (humanReviewStatus_ != null) { 189 output.writeMessage(3, getHumanReviewStatus()); 190 } 191 getUnknownFields().writeTo(output); 192 } 193 194 @java.lang.Override getSerializedSize()195 public int getSerializedSize() { 196 int size = memoizedSize; 197 if (size != -1) return size; 198 199 size = 0; 200 if (document_ != null) { 201 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDocument()); 202 } 203 if (humanReviewStatus_ != null) { 204 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHumanReviewStatus()); 205 } 206 size += getUnknownFields().getSerializedSize(); 207 memoizedSize = size; 208 return size; 209 } 210 211 @java.lang.Override equals(final java.lang.Object obj)212 public boolean equals(final java.lang.Object obj) { 213 if (obj == this) { 214 return true; 215 } 216 if (!(obj instanceof com.google.cloud.documentai.v1.ProcessResponse)) { 217 return super.equals(obj); 218 } 219 com.google.cloud.documentai.v1.ProcessResponse other = 220 (com.google.cloud.documentai.v1.ProcessResponse) obj; 221 222 if (hasDocument() != other.hasDocument()) return false; 223 if (hasDocument()) { 224 if (!getDocument().equals(other.getDocument())) return false; 225 } 226 if (hasHumanReviewStatus() != other.hasHumanReviewStatus()) return false; 227 if (hasHumanReviewStatus()) { 228 if (!getHumanReviewStatus().equals(other.getHumanReviewStatus())) return false; 229 } 230 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 231 return true; 232 } 233 234 @java.lang.Override hashCode()235 public int hashCode() { 236 if (memoizedHashCode != 0) { 237 return memoizedHashCode; 238 } 239 int hash = 41; 240 hash = (19 * hash) + getDescriptor().hashCode(); 241 if (hasDocument()) { 242 hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; 243 hash = (53 * hash) + getDocument().hashCode(); 244 } 245 if (hasHumanReviewStatus()) { 246 hash = (37 * hash) + HUMAN_REVIEW_STATUS_FIELD_NUMBER; 247 hash = (53 * hash) + getHumanReviewStatus().hashCode(); 248 } 249 hash = (29 * hash) + getUnknownFields().hashCode(); 250 memoizedHashCode = hash; 251 return hash; 252 } 253 parseFrom(java.nio.ByteBuffer data)254 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom(java.nio.ByteBuffer data) 255 throws com.google.protobuf.InvalidProtocolBufferException { 256 return PARSER.parseFrom(data); 257 } 258 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)259 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom( 260 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 261 throws com.google.protobuf.InvalidProtocolBufferException { 262 return PARSER.parseFrom(data, extensionRegistry); 263 } 264 parseFrom( com.google.protobuf.ByteString data)265 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom( 266 com.google.protobuf.ByteString data) 267 throws com.google.protobuf.InvalidProtocolBufferException { 268 return PARSER.parseFrom(data); 269 } 270 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)271 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom( 272 com.google.protobuf.ByteString data, 273 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 274 throws com.google.protobuf.InvalidProtocolBufferException { 275 return PARSER.parseFrom(data, extensionRegistry); 276 } 277 parseFrom(byte[] data)278 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom(byte[] data) 279 throws com.google.protobuf.InvalidProtocolBufferException { 280 return PARSER.parseFrom(data); 281 } 282 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)283 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom( 284 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 285 throws com.google.protobuf.InvalidProtocolBufferException { 286 return PARSER.parseFrom(data, extensionRegistry); 287 } 288 parseFrom(java.io.InputStream input)289 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom(java.io.InputStream input) 290 throws java.io.IOException { 291 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 292 } 293 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)294 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom( 295 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 296 throws java.io.IOException { 297 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 298 PARSER, input, extensionRegistry); 299 } 300 parseDelimitedFrom( java.io.InputStream input)301 public static com.google.cloud.documentai.v1.ProcessResponse parseDelimitedFrom( 302 java.io.InputStream input) throws java.io.IOException { 303 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 304 } 305 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)306 public static com.google.cloud.documentai.v1.ProcessResponse parseDelimitedFrom( 307 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 308 throws java.io.IOException { 309 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 310 PARSER, input, extensionRegistry); 311 } 312 parseFrom( com.google.protobuf.CodedInputStream input)313 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom( 314 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 315 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 316 } 317 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)318 public static com.google.cloud.documentai.v1.ProcessResponse parseFrom( 319 com.google.protobuf.CodedInputStream input, 320 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 321 throws java.io.IOException { 322 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 323 PARSER, input, extensionRegistry); 324 } 325 326 @java.lang.Override newBuilderForType()327 public Builder newBuilderForType() { 328 return newBuilder(); 329 } 330 newBuilder()331 public static Builder newBuilder() { 332 return DEFAULT_INSTANCE.toBuilder(); 333 } 334 newBuilder(com.google.cloud.documentai.v1.ProcessResponse prototype)335 public static Builder newBuilder(com.google.cloud.documentai.v1.ProcessResponse prototype) { 336 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 337 } 338 339 @java.lang.Override toBuilder()340 public Builder toBuilder() { 341 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 342 } 343 344 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)345 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 346 Builder builder = new Builder(parent); 347 return builder; 348 } 349 /** 350 * 351 * 352 * <pre> 353 * Response message for the process document method. 354 * </pre> 355 * 356 * Protobuf type {@code google.cloud.documentai.v1.ProcessResponse} 357 */ 358 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 359 implements 360 // @@protoc_insertion_point(builder_implements:google.cloud.documentai.v1.ProcessResponse) 361 com.google.cloud.documentai.v1.ProcessResponseOrBuilder { getDescriptor()362 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 363 return com.google.cloud.documentai.v1.DocumentAiProcessorService 364 .internal_static_google_cloud_documentai_v1_ProcessResponse_descriptor; 365 } 366 367 @java.lang.Override 368 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()369 internalGetFieldAccessorTable() { 370 return com.google.cloud.documentai.v1.DocumentAiProcessorService 371 .internal_static_google_cloud_documentai_v1_ProcessResponse_fieldAccessorTable 372 .ensureFieldAccessorsInitialized( 373 com.google.cloud.documentai.v1.ProcessResponse.class, 374 com.google.cloud.documentai.v1.ProcessResponse.Builder.class); 375 } 376 377 // Construct using com.google.cloud.documentai.v1.ProcessResponse.newBuilder() Builder()378 private Builder() {} 379 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)380 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 381 super(parent); 382 } 383 384 @java.lang.Override clear()385 public Builder clear() { 386 super.clear(); 387 bitField0_ = 0; 388 document_ = null; 389 if (documentBuilder_ != null) { 390 documentBuilder_.dispose(); 391 documentBuilder_ = null; 392 } 393 humanReviewStatus_ = null; 394 if (humanReviewStatusBuilder_ != null) { 395 humanReviewStatusBuilder_.dispose(); 396 humanReviewStatusBuilder_ = null; 397 } 398 return this; 399 } 400 401 @java.lang.Override getDescriptorForType()402 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 403 return com.google.cloud.documentai.v1.DocumentAiProcessorService 404 .internal_static_google_cloud_documentai_v1_ProcessResponse_descriptor; 405 } 406 407 @java.lang.Override getDefaultInstanceForType()408 public com.google.cloud.documentai.v1.ProcessResponse getDefaultInstanceForType() { 409 return com.google.cloud.documentai.v1.ProcessResponse.getDefaultInstance(); 410 } 411 412 @java.lang.Override build()413 public com.google.cloud.documentai.v1.ProcessResponse build() { 414 com.google.cloud.documentai.v1.ProcessResponse result = buildPartial(); 415 if (!result.isInitialized()) { 416 throw newUninitializedMessageException(result); 417 } 418 return result; 419 } 420 421 @java.lang.Override buildPartial()422 public com.google.cloud.documentai.v1.ProcessResponse buildPartial() { 423 com.google.cloud.documentai.v1.ProcessResponse result = 424 new com.google.cloud.documentai.v1.ProcessResponse(this); 425 if (bitField0_ != 0) { 426 buildPartial0(result); 427 } 428 onBuilt(); 429 return result; 430 } 431 buildPartial0(com.google.cloud.documentai.v1.ProcessResponse result)432 private void buildPartial0(com.google.cloud.documentai.v1.ProcessResponse result) { 433 int from_bitField0_ = bitField0_; 434 if (((from_bitField0_ & 0x00000001) != 0)) { 435 result.document_ = documentBuilder_ == null ? document_ : documentBuilder_.build(); 436 } 437 if (((from_bitField0_ & 0x00000002) != 0)) { 438 result.humanReviewStatus_ = 439 humanReviewStatusBuilder_ == null 440 ? humanReviewStatus_ 441 : humanReviewStatusBuilder_.build(); 442 } 443 } 444 445 @java.lang.Override clone()446 public Builder clone() { 447 return super.clone(); 448 } 449 450 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)451 public Builder setField( 452 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 453 return super.setField(field, value); 454 } 455 456 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)457 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 458 return super.clearField(field); 459 } 460 461 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)462 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 463 return super.clearOneof(oneof); 464 } 465 466 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)467 public Builder setRepeatedField( 468 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 469 return super.setRepeatedField(field, index, value); 470 } 471 472 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)473 public Builder addRepeatedField( 474 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 475 return super.addRepeatedField(field, value); 476 } 477 478 @java.lang.Override mergeFrom(com.google.protobuf.Message other)479 public Builder mergeFrom(com.google.protobuf.Message other) { 480 if (other instanceof com.google.cloud.documentai.v1.ProcessResponse) { 481 return mergeFrom((com.google.cloud.documentai.v1.ProcessResponse) other); 482 } else { 483 super.mergeFrom(other); 484 return this; 485 } 486 } 487 mergeFrom(com.google.cloud.documentai.v1.ProcessResponse other)488 public Builder mergeFrom(com.google.cloud.documentai.v1.ProcessResponse other) { 489 if (other == com.google.cloud.documentai.v1.ProcessResponse.getDefaultInstance()) return this; 490 if (other.hasDocument()) { 491 mergeDocument(other.getDocument()); 492 } 493 if (other.hasHumanReviewStatus()) { 494 mergeHumanReviewStatus(other.getHumanReviewStatus()); 495 } 496 this.mergeUnknownFields(other.getUnknownFields()); 497 onChanged(); 498 return this; 499 } 500 501 @java.lang.Override isInitialized()502 public final boolean isInitialized() { 503 return true; 504 } 505 506 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)507 public Builder mergeFrom( 508 com.google.protobuf.CodedInputStream input, 509 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 510 throws java.io.IOException { 511 if (extensionRegistry == null) { 512 throw new java.lang.NullPointerException(); 513 } 514 try { 515 boolean done = false; 516 while (!done) { 517 int tag = input.readTag(); 518 switch (tag) { 519 case 0: 520 done = true; 521 break; 522 case 10: 523 { 524 input.readMessage(getDocumentFieldBuilder().getBuilder(), extensionRegistry); 525 bitField0_ |= 0x00000001; 526 break; 527 } // case 10 528 case 26: 529 { 530 input.readMessage( 531 getHumanReviewStatusFieldBuilder().getBuilder(), extensionRegistry); 532 bitField0_ |= 0x00000002; 533 break; 534 } // case 26 535 default: 536 { 537 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 538 done = true; // was an endgroup tag 539 } 540 break; 541 } // default: 542 } // switch (tag) 543 } // while (!done) 544 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 545 throw e.unwrapIOException(); 546 } finally { 547 onChanged(); 548 } // finally 549 return this; 550 } 551 552 private int bitField0_; 553 554 private com.google.cloud.documentai.v1.Document document_; 555 private com.google.protobuf.SingleFieldBuilderV3< 556 com.google.cloud.documentai.v1.Document, 557 com.google.cloud.documentai.v1.Document.Builder, 558 com.google.cloud.documentai.v1.DocumentOrBuilder> 559 documentBuilder_; 560 /** 561 * 562 * 563 * <pre> 564 * The document payload, will populate fields based on the processor's 565 * behavior. 566 * </pre> 567 * 568 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 569 * 570 * @return Whether the document field is set. 571 */ hasDocument()572 public boolean hasDocument() { 573 return ((bitField0_ & 0x00000001) != 0); 574 } 575 /** 576 * 577 * 578 * <pre> 579 * The document payload, will populate fields based on the processor's 580 * behavior. 581 * </pre> 582 * 583 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 584 * 585 * @return The document. 586 */ getDocument()587 public com.google.cloud.documentai.v1.Document getDocument() { 588 if (documentBuilder_ == null) { 589 return document_ == null 590 ? com.google.cloud.documentai.v1.Document.getDefaultInstance() 591 : document_; 592 } else { 593 return documentBuilder_.getMessage(); 594 } 595 } 596 /** 597 * 598 * 599 * <pre> 600 * The document payload, will populate fields based on the processor's 601 * behavior. 602 * </pre> 603 * 604 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 605 */ setDocument(com.google.cloud.documentai.v1.Document value)606 public Builder setDocument(com.google.cloud.documentai.v1.Document value) { 607 if (documentBuilder_ == null) { 608 if (value == null) { 609 throw new NullPointerException(); 610 } 611 document_ = value; 612 } else { 613 documentBuilder_.setMessage(value); 614 } 615 bitField0_ |= 0x00000001; 616 onChanged(); 617 return this; 618 } 619 /** 620 * 621 * 622 * <pre> 623 * The document payload, will populate fields based on the processor's 624 * behavior. 625 * </pre> 626 * 627 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 628 */ setDocument(com.google.cloud.documentai.v1.Document.Builder builderForValue)629 public Builder setDocument(com.google.cloud.documentai.v1.Document.Builder builderForValue) { 630 if (documentBuilder_ == null) { 631 document_ = builderForValue.build(); 632 } else { 633 documentBuilder_.setMessage(builderForValue.build()); 634 } 635 bitField0_ |= 0x00000001; 636 onChanged(); 637 return this; 638 } 639 /** 640 * 641 * 642 * <pre> 643 * The document payload, will populate fields based on the processor's 644 * behavior. 645 * </pre> 646 * 647 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 648 */ mergeDocument(com.google.cloud.documentai.v1.Document value)649 public Builder mergeDocument(com.google.cloud.documentai.v1.Document value) { 650 if (documentBuilder_ == null) { 651 if (((bitField0_ & 0x00000001) != 0) 652 && document_ != null 653 && document_ != com.google.cloud.documentai.v1.Document.getDefaultInstance()) { 654 getDocumentBuilder().mergeFrom(value); 655 } else { 656 document_ = value; 657 } 658 } else { 659 documentBuilder_.mergeFrom(value); 660 } 661 bitField0_ |= 0x00000001; 662 onChanged(); 663 return this; 664 } 665 /** 666 * 667 * 668 * <pre> 669 * The document payload, will populate fields based on the processor's 670 * behavior. 671 * </pre> 672 * 673 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 674 */ clearDocument()675 public Builder clearDocument() { 676 bitField0_ = (bitField0_ & ~0x00000001); 677 document_ = null; 678 if (documentBuilder_ != null) { 679 documentBuilder_.dispose(); 680 documentBuilder_ = null; 681 } 682 onChanged(); 683 return this; 684 } 685 /** 686 * 687 * 688 * <pre> 689 * The document payload, will populate fields based on the processor's 690 * behavior. 691 * </pre> 692 * 693 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 694 */ getDocumentBuilder()695 public com.google.cloud.documentai.v1.Document.Builder getDocumentBuilder() { 696 bitField0_ |= 0x00000001; 697 onChanged(); 698 return getDocumentFieldBuilder().getBuilder(); 699 } 700 /** 701 * 702 * 703 * <pre> 704 * The document payload, will populate fields based on the processor's 705 * behavior. 706 * </pre> 707 * 708 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 709 */ getDocumentOrBuilder()710 public com.google.cloud.documentai.v1.DocumentOrBuilder getDocumentOrBuilder() { 711 if (documentBuilder_ != null) { 712 return documentBuilder_.getMessageOrBuilder(); 713 } else { 714 return document_ == null 715 ? com.google.cloud.documentai.v1.Document.getDefaultInstance() 716 : document_; 717 } 718 } 719 /** 720 * 721 * 722 * <pre> 723 * The document payload, will populate fields based on the processor's 724 * behavior. 725 * </pre> 726 * 727 * <code>.google.cloud.documentai.v1.Document document = 1;</code> 728 */ 729 private com.google.protobuf.SingleFieldBuilderV3< 730 com.google.cloud.documentai.v1.Document, 731 com.google.cloud.documentai.v1.Document.Builder, 732 com.google.cloud.documentai.v1.DocumentOrBuilder> getDocumentFieldBuilder()733 getDocumentFieldBuilder() { 734 if (documentBuilder_ == null) { 735 documentBuilder_ = 736 new com.google.protobuf.SingleFieldBuilderV3< 737 com.google.cloud.documentai.v1.Document, 738 com.google.cloud.documentai.v1.Document.Builder, 739 com.google.cloud.documentai.v1.DocumentOrBuilder>( 740 getDocument(), getParentForChildren(), isClean()); 741 document_ = null; 742 } 743 return documentBuilder_; 744 } 745 746 private com.google.cloud.documentai.v1.HumanReviewStatus humanReviewStatus_; 747 private com.google.protobuf.SingleFieldBuilderV3< 748 com.google.cloud.documentai.v1.HumanReviewStatus, 749 com.google.cloud.documentai.v1.HumanReviewStatus.Builder, 750 com.google.cloud.documentai.v1.HumanReviewStatusOrBuilder> 751 humanReviewStatusBuilder_; 752 /** 753 * 754 * 755 * <pre> 756 * The status of human review on the processed document. 757 * </pre> 758 * 759 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 760 * 761 * @return Whether the humanReviewStatus field is set. 762 */ hasHumanReviewStatus()763 public boolean hasHumanReviewStatus() { 764 return ((bitField0_ & 0x00000002) != 0); 765 } 766 /** 767 * 768 * 769 * <pre> 770 * The status of human review on the processed document. 771 * </pre> 772 * 773 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 774 * 775 * @return The humanReviewStatus. 776 */ getHumanReviewStatus()777 public com.google.cloud.documentai.v1.HumanReviewStatus getHumanReviewStatus() { 778 if (humanReviewStatusBuilder_ == null) { 779 return humanReviewStatus_ == null 780 ? com.google.cloud.documentai.v1.HumanReviewStatus.getDefaultInstance() 781 : humanReviewStatus_; 782 } else { 783 return humanReviewStatusBuilder_.getMessage(); 784 } 785 } 786 /** 787 * 788 * 789 * <pre> 790 * The status of human review on the processed document. 791 * </pre> 792 * 793 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 794 */ setHumanReviewStatus(com.google.cloud.documentai.v1.HumanReviewStatus value)795 public Builder setHumanReviewStatus(com.google.cloud.documentai.v1.HumanReviewStatus value) { 796 if (humanReviewStatusBuilder_ == null) { 797 if (value == null) { 798 throw new NullPointerException(); 799 } 800 humanReviewStatus_ = value; 801 } else { 802 humanReviewStatusBuilder_.setMessage(value); 803 } 804 bitField0_ |= 0x00000002; 805 onChanged(); 806 return this; 807 } 808 /** 809 * 810 * 811 * <pre> 812 * The status of human review on the processed document. 813 * </pre> 814 * 815 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 816 */ setHumanReviewStatus( com.google.cloud.documentai.v1.HumanReviewStatus.Builder builderForValue)817 public Builder setHumanReviewStatus( 818 com.google.cloud.documentai.v1.HumanReviewStatus.Builder builderForValue) { 819 if (humanReviewStatusBuilder_ == null) { 820 humanReviewStatus_ = builderForValue.build(); 821 } else { 822 humanReviewStatusBuilder_.setMessage(builderForValue.build()); 823 } 824 bitField0_ |= 0x00000002; 825 onChanged(); 826 return this; 827 } 828 /** 829 * 830 * 831 * <pre> 832 * The status of human review on the processed document. 833 * </pre> 834 * 835 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 836 */ mergeHumanReviewStatus(com.google.cloud.documentai.v1.HumanReviewStatus value)837 public Builder mergeHumanReviewStatus(com.google.cloud.documentai.v1.HumanReviewStatus value) { 838 if (humanReviewStatusBuilder_ == null) { 839 if (((bitField0_ & 0x00000002) != 0) 840 && humanReviewStatus_ != null 841 && humanReviewStatus_ 842 != com.google.cloud.documentai.v1.HumanReviewStatus.getDefaultInstance()) { 843 getHumanReviewStatusBuilder().mergeFrom(value); 844 } else { 845 humanReviewStatus_ = value; 846 } 847 } else { 848 humanReviewStatusBuilder_.mergeFrom(value); 849 } 850 bitField0_ |= 0x00000002; 851 onChanged(); 852 return this; 853 } 854 /** 855 * 856 * 857 * <pre> 858 * The status of human review on the processed document. 859 * </pre> 860 * 861 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 862 */ clearHumanReviewStatus()863 public Builder clearHumanReviewStatus() { 864 bitField0_ = (bitField0_ & ~0x00000002); 865 humanReviewStatus_ = null; 866 if (humanReviewStatusBuilder_ != null) { 867 humanReviewStatusBuilder_.dispose(); 868 humanReviewStatusBuilder_ = null; 869 } 870 onChanged(); 871 return this; 872 } 873 /** 874 * 875 * 876 * <pre> 877 * The status of human review on the processed document. 878 * </pre> 879 * 880 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 881 */ getHumanReviewStatusBuilder()882 public com.google.cloud.documentai.v1.HumanReviewStatus.Builder getHumanReviewStatusBuilder() { 883 bitField0_ |= 0x00000002; 884 onChanged(); 885 return getHumanReviewStatusFieldBuilder().getBuilder(); 886 } 887 /** 888 * 889 * 890 * <pre> 891 * The status of human review on the processed document. 892 * </pre> 893 * 894 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 895 */ 896 public com.google.cloud.documentai.v1.HumanReviewStatusOrBuilder getHumanReviewStatusOrBuilder()897 getHumanReviewStatusOrBuilder() { 898 if (humanReviewStatusBuilder_ != null) { 899 return humanReviewStatusBuilder_.getMessageOrBuilder(); 900 } else { 901 return humanReviewStatus_ == null 902 ? com.google.cloud.documentai.v1.HumanReviewStatus.getDefaultInstance() 903 : humanReviewStatus_; 904 } 905 } 906 /** 907 * 908 * 909 * <pre> 910 * The status of human review on the processed document. 911 * </pre> 912 * 913 * <code>.google.cloud.documentai.v1.HumanReviewStatus human_review_status = 3;</code> 914 */ 915 private com.google.protobuf.SingleFieldBuilderV3< 916 com.google.cloud.documentai.v1.HumanReviewStatus, 917 com.google.cloud.documentai.v1.HumanReviewStatus.Builder, 918 com.google.cloud.documentai.v1.HumanReviewStatusOrBuilder> getHumanReviewStatusFieldBuilder()919 getHumanReviewStatusFieldBuilder() { 920 if (humanReviewStatusBuilder_ == null) { 921 humanReviewStatusBuilder_ = 922 new com.google.protobuf.SingleFieldBuilderV3< 923 com.google.cloud.documentai.v1.HumanReviewStatus, 924 com.google.cloud.documentai.v1.HumanReviewStatus.Builder, 925 com.google.cloud.documentai.v1.HumanReviewStatusOrBuilder>( 926 getHumanReviewStatus(), getParentForChildren(), isClean()); 927 humanReviewStatus_ = null; 928 } 929 return humanReviewStatusBuilder_; 930 } 931 932 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)933 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 934 return super.setUnknownFields(unknownFields); 935 } 936 937 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)938 public final Builder mergeUnknownFields( 939 final com.google.protobuf.UnknownFieldSet unknownFields) { 940 return super.mergeUnknownFields(unknownFields); 941 } 942 943 // @@protoc_insertion_point(builder_scope:google.cloud.documentai.v1.ProcessResponse) 944 } 945 946 // @@protoc_insertion_point(class_scope:google.cloud.documentai.v1.ProcessResponse) 947 private static final com.google.cloud.documentai.v1.ProcessResponse DEFAULT_INSTANCE; 948 949 static { 950 DEFAULT_INSTANCE = new com.google.cloud.documentai.v1.ProcessResponse(); 951 } 952 getDefaultInstance()953 public static com.google.cloud.documentai.v1.ProcessResponse getDefaultInstance() { 954 return DEFAULT_INSTANCE; 955 } 956 957 private static final com.google.protobuf.Parser<ProcessResponse> PARSER = 958 new com.google.protobuf.AbstractParser<ProcessResponse>() { 959 @java.lang.Override 960 public ProcessResponse parsePartialFrom( 961 com.google.protobuf.CodedInputStream input, 962 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 963 throws com.google.protobuf.InvalidProtocolBufferException { 964 Builder builder = newBuilder(); 965 try { 966 builder.mergeFrom(input, extensionRegistry); 967 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 968 throw e.setUnfinishedMessage(builder.buildPartial()); 969 } catch (com.google.protobuf.UninitializedMessageException e) { 970 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 971 } catch (java.io.IOException e) { 972 throw new com.google.protobuf.InvalidProtocolBufferException(e) 973 .setUnfinishedMessage(builder.buildPartial()); 974 } 975 return builder.buildPartial(); 976 } 977 }; 978 parser()979 public static com.google.protobuf.Parser<ProcessResponse> parser() { 980 return PARSER; 981 } 982 983 @java.lang.Override getParserForType()984 public com.google.protobuf.Parser<ProcessResponse> getParserForType() { 985 return PARSER; 986 } 987 988 @java.lang.Override getDefaultInstanceForType()989 public com.google.cloud.documentai.v1.ProcessResponse getDefaultInstanceForType() { 990 return DEFAULT_INSTANCE; 991 } 992 } 993