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/automl/v1/io.proto 18 19 package com.google.cloud.automl.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Input configuration of a [Document][google.cloud.automl.v1.Document]. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.automl.v1.DocumentInputConfig} 29 */ 30 public final class DocumentInputConfig extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.DocumentInputConfig) 33 DocumentInputConfigOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use DocumentInputConfig.newBuilder() to construct. DocumentInputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private DocumentInputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 DocumentInputConfig()40 private DocumentInputConfig() {} 41 42 @java.lang.Override 43 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)44 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 45 return new DocumentInputConfig(); 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.automl.v1.Io 55 .internal_static_google_cloud_automl_v1_DocumentInputConfig_descriptor; 56 } 57 58 @java.lang.Override 59 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()60 internalGetFieldAccessorTable() { 61 return com.google.cloud.automl.v1.Io 62 .internal_static_google_cloud_automl_v1_DocumentInputConfig_fieldAccessorTable 63 .ensureFieldAccessorsInitialized( 64 com.google.cloud.automl.v1.DocumentInputConfig.class, 65 com.google.cloud.automl.v1.DocumentInputConfig.Builder.class); 66 } 67 68 public static final int GCS_SOURCE_FIELD_NUMBER = 1; 69 private com.google.cloud.automl.v1.GcsSource gcsSource_; 70 /** 71 * 72 * 73 * <pre> 74 * The Google Cloud Storage location of the document file. Only a single path 75 * should be given. 76 * Max supported size: 512MB. 77 * Supported extensions: .PDF. 78 * </pre> 79 * 80 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 81 * 82 * @return Whether the gcsSource field is set. 83 */ 84 @java.lang.Override hasGcsSource()85 public boolean hasGcsSource() { 86 return gcsSource_ != null; 87 } 88 /** 89 * 90 * 91 * <pre> 92 * The Google Cloud Storage location of the document file. Only a single path 93 * should be given. 94 * Max supported size: 512MB. 95 * Supported extensions: .PDF. 96 * </pre> 97 * 98 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 99 * 100 * @return The gcsSource. 101 */ 102 @java.lang.Override getGcsSource()103 public com.google.cloud.automl.v1.GcsSource getGcsSource() { 104 return gcsSource_ == null 105 ? com.google.cloud.automl.v1.GcsSource.getDefaultInstance() 106 : gcsSource_; 107 } 108 /** 109 * 110 * 111 * <pre> 112 * The Google Cloud Storage location of the document file. Only a single path 113 * should be given. 114 * Max supported size: 512MB. 115 * Supported extensions: .PDF. 116 * </pre> 117 * 118 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 119 */ 120 @java.lang.Override getGcsSourceOrBuilder()121 public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { 122 return gcsSource_ == null 123 ? com.google.cloud.automl.v1.GcsSource.getDefaultInstance() 124 : gcsSource_; 125 } 126 127 private byte memoizedIsInitialized = -1; 128 129 @java.lang.Override isInitialized()130 public final boolean isInitialized() { 131 byte isInitialized = memoizedIsInitialized; 132 if (isInitialized == 1) return true; 133 if (isInitialized == 0) return false; 134 135 memoizedIsInitialized = 1; 136 return true; 137 } 138 139 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)140 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 141 if (gcsSource_ != null) { 142 output.writeMessage(1, getGcsSource()); 143 } 144 getUnknownFields().writeTo(output); 145 } 146 147 @java.lang.Override getSerializedSize()148 public int getSerializedSize() { 149 int size = memoizedSize; 150 if (size != -1) return size; 151 152 size = 0; 153 if (gcsSource_ != null) { 154 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGcsSource()); 155 } 156 size += getUnknownFields().getSerializedSize(); 157 memoizedSize = size; 158 return size; 159 } 160 161 @java.lang.Override equals(final java.lang.Object obj)162 public boolean equals(final java.lang.Object obj) { 163 if (obj == this) { 164 return true; 165 } 166 if (!(obj instanceof com.google.cloud.automl.v1.DocumentInputConfig)) { 167 return super.equals(obj); 168 } 169 com.google.cloud.automl.v1.DocumentInputConfig other = 170 (com.google.cloud.automl.v1.DocumentInputConfig) obj; 171 172 if (hasGcsSource() != other.hasGcsSource()) return false; 173 if (hasGcsSource()) { 174 if (!getGcsSource().equals(other.getGcsSource())) return false; 175 } 176 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 177 return true; 178 } 179 180 @java.lang.Override hashCode()181 public int hashCode() { 182 if (memoizedHashCode != 0) { 183 return memoizedHashCode; 184 } 185 int hash = 41; 186 hash = (19 * hash) + getDescriptor().hashCode(); 187 if (hasGcsSource()) { 188 hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; 189 hash = (53 * hash) + getGcsSource().hashCode(); 190 } 191 hash = (29 * hash) + getUnknownFields().hashCode(); 192 memoizedHashCode = hash; 193 return hash; 194 } 195 parseFrom(java.nio.ByteBuffer data)196 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom(java.nio.ByteBuffer data) 197 throws com.google.protobuf.InvalidProtocolBufferException { 198 return PARSER.parseFrom(data); 199 } 200 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)201 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom( 202 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 203 throws com.google.protobuf.InvalidProtocolBufferException { 204 return PARSER.parseFrom(data, extensionRegistry); 205 } 206 parseFrom( com.google.protobuf.ByteString data)207 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom( 208 com.google.protobuf.ByteString data) 209 throws com.google.protobuf.InvalidProtocolBufferException { 210 return PARSER.parseFrom(data); 211 } 212 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)213 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom( 214 com.google.protobuf.ByteString data, 215 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 216 throws com.google.protobuf.InvalidProtocolBufferException { 217 return PARSER.parseFrom(data, extensionRegistry); 218 } 219 parseFrom(byte[] data)220 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom(byte[] data) 221 throws com.google.protobuf.InvalidProtocolBufferException { 222 return PARSER.parseFrom(data); 223 } 224 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)225 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom( 226 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 227 throws com.google.protobuf.InvalidProtocolBufferException { 228 return PARSER.parseFrom(data, extensionRegistry); 229 } 230 parseFrom(java.io.InputStream input)231 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom(java.io.InputStream input) 232 throws java.io.IOException { 233 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 234 } 235 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)236 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom( 237 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 238 throws java.io.IOException { 239 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 240 PARSER, input, extensionRegistry); 241 } 242 parseDelimitedFrom( java.io.InputStream input)243 public static com.google.cloud.automl.v1.DocumentInputConfig parseDelimitedFrom( 244 java.io.InputStream input) throws java.io.IOException { 245 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 246 } 247 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)248 public static com.google.cloud.automl.v1.DocumentInputConfig parseDelimitedFrom( 249 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 250 throws java.io.IOException { 251 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 252 PARSER, input, extensionRegistry); 253 } 254 parseFrom( com.google.protobuf.CodedInputStream input)255 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom( 256 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 257 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 258 } 259 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)260 public static com.google.cloud.automl.v1.DocumentInputConfig parseFrom( 261 com.google.protobuf.CodedInputStream input, 262 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 263 throws java.io.IOException { 264 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 265 PARSER, input, extensionRegistry); 266 } 267 268 @java.lang.Override newBuilderForType()269 public Builder newBuilderForType() { 270 return newBuilder(); 271 } 272 newBuilder()273 public static Builder newBuilder() { 274 return DEFAULT_INSTANCE.toBuilder(); 275 } 276 newBuilder(com.google.cloud.automl.v1.DocumentInputConfig prototype)277 public static Builder newBuilder(com.google.cloud.automl.v1.DocumentInputConfig prototype) { 278 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 279 } 280 281 @java.lang.Override toBuilder()282 public Builder toBuilder() { 283 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 284 } 285 286 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)287 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 288 Builder builder = new Builder(parent); 289 return builder; 290 } 291 /** 292 * 293 * 294 * <pre> 295 * Input configuration of a [Document][google.cloud.automl.v1.Document]. 296 * </pre> 297 * 298 * Protobuf type {@code google.cloud.automl.v1.DocumentInputConfig} 299 */ 300 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 301 implements 302 // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.DocumentInputConfig) 303 com.google.cloud.automl.v1.DocumentInputConfigOrBuilder { getDescriptor()304 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 305 return com.google.cloud.automl.v1.Io 306 .internal_static_google_cloud_automl_v1_DocumentInputConfig_descriptor; 307 } 308 309 @java.lang.Override 310 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()311 internalGetFieldAccessorTable() { 312 return com.google.cloud.automl.v1.Io 313 .internal_static_google_cloud_automl_v1_DocumentInputConfig_fieldAccessorTable 314 .ensureFieldAccessorsInitialized( 315 com.google.cloud.automl.v1.DocumentInputConfig.class, 316 com.google.cloud.automl.v1.DocumentInputConfig.Builder.class); 317 } 318 319 // Construct using com.google.cloud.automl.v1.DocumentInputConfig.newBuilder() Builder()320 private Builder() {} 321 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)322 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 323 super(parent); 324 } 325 326 @java.lang.Override clear()327 public Builder clear() { 328 super.clear(); 329 bitField0_ = 0; 330 gcsSource_ = null; 331 if (gcsSourceBuilder_ != null) { 332 gcsSourceBuilder_.dispose(); 333 gcsSourceBuilder_ = null; 334 } 335 return this; 336 } 337 338 @java.lang.Override getDescriptorForType()339 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 340 return com.google.cloud.automl.v1.Io 341 .internal_static_google_cloud_automl_v1_DocumentInputConfig_descriptor; 342 } 343 344 @java.lang.Override getDefaultInstanceForType()345 public com.google.cloud.automl.v1.DocumentInputConfig getDefaultInstanceForType() { 346 return com.google.cloud.automl.v1.DocumentInputConfig.getDefaultInstance(); 347 } 348 349 @java.lang.Override build()350 public com.google.cloud.automl.v1.DocumentInputConfig build() { 351 com.google.cloud.automl.v1.DocumentInputConfig result = buildPartial(); 352 if (!result.isInitialized()) { 353 throw newUninitializedMessageException(result); 354 } 355 return result; 356 } 357 358 @java.lang.Override buildPartial()359 public com.google.cloud.automl.v1.DocumentInputConfig buildPartial() { 360 com.google.cloud.automl.v1.DocumentInputConfig result = 361 new com.google.cloud.automl.v1.DocumentInputConfig(this); 362 if (bitField0_ != 0) { 363 buildPartial0(result); 364 } 365 onBuilt(); 366 return result; 367 } 368 buildPartial0(com.google.cloud.automl.v1.DocumentInputConfig result)369 private void buildPartial0(com.google.cloud.automl.v1.DocumentInputConfig result) { 370 int from_bitField0_ = bitField0_; 371 if (((from_bitField0_ & 0x00000001) != 0)) { 372 result.gcsSource_ = gcsSourceBuilder_ == null ? gcsSource_ : gcsSourceBuilder_.build(); 373 } 374 } 375 376 @java.lang.Override clone()377 public Builder clone() { 378 return super.clone(); 379 } 380 381 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)382 public Builder setField( 383 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 384 return super.setField(field, value); 385 } 386 387 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)388 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 389 return super.clearField(field); 390 } 391 392 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)393 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 394 return super.clearOneof(oneof); 395 } 396 397 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)398 public Builder setRepeatedField( 399 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 400 return super.setRepeatedField(field, index, value); 401 } 402 403 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)404 public Builder addRepeatedField( 405 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 406 return super.addRepeatedField(field, value); 407 } 408 409 @java.lang.Override mergeFrom(com.google.protobuf.Message other)410 public Builder mergeFrom(com.google.protobuf.Message other) { 411 if (other instanceof com.google.cloud.automl.v1.DocumentInputConfig) { 412 return mergeFrom((com.google.cloud.automl.v1.DocumentInputConfig) other); 413 } else { 414 super.mergeFrom(other); 415 return this; 416 } 417 } 418 mergeFrom(com.google.cloud.automl.v1.DocumentInputConfig other)419 public Builder mergeFrom(com.google.cloud.automl.v1.DocumentInputConfig other) { 420 if (other == com.google.cloud.automl.v1.DocumentInputConfig.getDefaultInstance()) return this; 421 if (other.hasGcsSource()) { 422 mergeGcsSource(other.getGcsSource()); 423 } 424 this.mergeUnknownFields(other.getUnknownFields()); 425 onChanged(); 426 return this; 427 } 428 429 @java.lang.Override isInitialized()430 public final boolean isInitialized() { 431 return true; 432 } 433 434 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)435 public Builder mergeFrom( 436 com.google.protobuf.CodedInputStream input, 437 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 438 throws java.io.IOException { 439 if (extensionRegistry == null) { 440 throw new java.lang.NullPointerException(); 441 } 442 try { 443 boolean done = false; 444 while (!done) { 445 int tag = input.readTag(); 446 switch (tag) { 447 case 0: 448 done = true; 449 break; 450 case 10: 451 { 452 input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); 453 bitField0_ |= 0x00000001; 454 break; 455 } // case 10 456 default: 457 { 458 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 459 done = true; // was an endgroup tag 460 } 461 break; 462 } // default: 463 } // switch (tag) 464 } // while (!done) 465 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 466 throw e.unwrapIOException(); 467 } finally { 468 onChanged(); 469 } // finally 470 return this; 471 } 472 473 private int bitField0_; 474 475 private com.google.cloud.automl.v1.GcsSource gcsSource_; 476 private com.google.protobuf.SingleFieldBuilderV3< 477 com.google.cloud.automl.v1.GcsSource, 478 com.google.cloud.automl.v1.GcsSource.Builder, 479 com.google.cloud.automl.v1.GcsSourceOrBuilder> 480 gcsSourceBuilder_; 481 /** 482 * 483 * 484 * <pre> 485 * The Google Cloud Storage location of the document file. Only a single path 486 * should be given. 487 * Max supported size: 512MB. 488 * Supported extensions: .PDF. 489 * </pre> 490 * 491 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 492 * 493 * @return Whether the gcsSource field is set. 494 */ hasGcsSource()495 public boolean hasGcsSource() { 496 return ((bitField0_ & 0x00000001) != 0); 497 } 498 /** 499 * 500 * 501 * <pre> 502 * The Google Cloud Storage location of the document file. Only a single path 503 * should be given. 504 * Max supported size: 512MB. 505 * Supported extensions: .PDF. 506 * </pre> 507 * 508 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 509 * 510 * @return The gcsSource. 511 */ getGcsSource()512 public com.google.cloud.automl.v1.GcsSource getGcsSource() { 513 if (gcsSourceBuilder_ == null) { 514 return gcsSource_ == null 515 ? com.google.cloud.automl.v1.GcsSource.getDefaultInstance() 516 : gcsSource_; 517 } else { 518 return gcsSourceBuilder_.getMessage(); 519 } 520 } 521 /** 522 * 523 * 524 * <pre> 525 * The Google Cloud Storage location of the document file. Only a single path 526 * should be given. 527 * Max supported size: 512MB. 528 * Supported extensions: .PDF. 529 * </pre> 530 * 531 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 532 */ setGcsSource(com.google.cloud.automl.v1.GcsSource value)533 public Builder setGcsSource(com.google.cloud.automl.v1.GcsSource value) { 534 if (gcsSourceBuilder_ == null) { 535 if (value == null) { 536 throw new NullPointerException(); 537 } 538 gcsSource_ = value; 539 } else { 540 gcsSourceBuilder_.setMessage(value); 541 } 542 bitField0_ |= 0x00000001; 543 onChanged(); 544 return this; 545 } 546 /** 547 * 548 * 549 * <pre> 550 * The Google Cloud Storage location of the document file. Only a single path 551 * should be given. 552 * Max supported size: 512MB. 553 * Supported extensions: .PDF. 554 * </pre> 555 * 556 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 557 */ setGcsSource(com.google.cloud.automl.v1.GcsSource.Builder builderForValue)558 public Builder setGcsSource(com.google.cloud.automl.v1.GcsSource.Builder builderForValue) { 559 if (gcsSourceBuilder_ == null) { 560 gcsSource_ = builderForValue.build(); 561 } else { 562 gcsSourceBuilder_.setMessage(builderForValue.build()); 563 } 564 bitField0_ |= 0x00000001; 565 onChanged(); 566 return this; 567 } 568 /** 569 * 570 * 571 * <pre> 572 * The Google Cloud Storage location of the document file. Only a single path 573 * should be given. 574 * Max supported size: 512MB. 575 * Supported extensions: .PDF. 576 * </pre> 577 * 578 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 579 */ mergeGcsSource(com.google.cloud.automl.v1.GcsSource value)580 public Builder mergeGcsSource(com.google.cloud.automl.v1.GcsSource value) { 581 if (gcsSourceBuilder_ == null) { 582 if (((bitField0_ & 0x00000001) != 0) 583 && gcsSource_ != null 584 && gcsSource_ != com.google.cloud.automl.v1.GcsSource.getDefaultInstance()) { 585 getGcsSourceBuilder().mergeFrom(value); 586 } else { 587 gcsSource_ = value; 588 } 589 } else { 590 gcsSourceBuilder_.mergeFrom(value); 591 } 592 bitField0_ |= 0x00000001; 593 onChanged(); 594 return this; 595 } 596 /** 597 * 598 * 599 * <pre> 600 * The Google Cloud Storage location of the document file. Only a single path 601 * should be given. 602 * Max supported size: 512MB. 603 * Supported extensions: .PDF. 604 * </pre> 605 * 606 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 607 */ clearGcsSource()608 public Builder clearGcsSource() { 609 bitField0_ = (bitField0_ & ~0x00000001); 610 gcsSource_ = null; 611 if (gcsSourceBuilder_ != null) { 612 gcsSourceBuilder_.dispose(); 613 gcsSourceBuilder_ = null; 614 } 615 onChanged(); 616 return this; 617 } 618 /** 619 * 620 * 621 * <pre> 622 * The Google Cloud Storage location of the document file. Only a single path 623 * should be given. 624 * Max supported size: 512MB. 625 * Supported extensions: .PDF. 626 * </pre> 627 * 628 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 629 */ getGcsSourceBuilder()630 public com.google.cloud.automl.v1.GcsSource.Builder getGcsSourceBuilder() { 631 bitField0_ |= 0x00000001; 632 onChanged(); 633 return getGcsSourceFieldBuilder().getBuilder(); 634 } 635 /** 636 * 637 * 638 * <pre> 639 * The Google Cloud Storage location of the document file. Only a single path 640 * should be given. 641 * Max supported size: 512MB. 642 * Supported extensions: .PDF. 643 * </pre> 644 * 645 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 646 */ getGcsSourceOrBuilder()647 public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { 648 if (gcsSourceBuilder_ != null) { 649 return gcsSourceBuilder_.getMessageOrBuilder(); 650 } else { 651 return gcsSource_ == null 652 ? com.google.cloud.automl.v1.GcsSource.getDefaultInstance() 653 : gcsSource_; 654 } 655 } 656 /** 657 * 658 * 659 * <pre> 660 * The Google Cloud Storage location of the document file. Only a single path 661 * should be given. 662 * Max supported size: 512MB. 663 * Supported extensions: .PDF. 664 * </pre> 665 * 666 * <code>.google.cloud.automl.v1.GcsSource gcs_source = 1;</code> 667 */ 668 private com.google.protobuf.SingleFieldBuilderV3< 669 com.google.cloud.automl.v1.GcsSource, 670 com.google.cloud.automl.v1.GcsSource.Builder, 671 com.google.cloud.automl.v1.GcsSourceOrBuilder> getGcsSourceFieldBuilder()672 getGcsSourceFieldBuilder() { 673 if (gcsSourceBuilder_ == null) { 674 gcsSourceBuilder_ = 675 new com.google.protobuf.SingleFieldBuilderV3< 676 com.google.cloud.automl.v1.GcsSource, 677 com.google.cloud.automl.v1.GcsSource.Builder, 678 com.google.cloud.automl.v1.GcsSourceOrBuilder>( 679 getGcsSource(), getParentForChildren(), isClean()); 680 gcsSource_ = null; 681 } 682 return gcsSourceBuilder_; 683 } 684 685 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)686 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 687 return super.setUnknownFields(unknownFields); 688 } 689 690 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)691 public final Builder mergeUnknownFields( 692 final com.google.protobuf.UnknownFieldSet unknownFields) { 693 return super.mergeUnknownFields(unknownFields); 694 } 695 696 // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.DocumentInputConfig) 697 } 698 699 // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.DocumentInputConfig) 700 private static final com.google.cloud.automl.v1.DocumentInputConfig DEFAULT_INSTANCE; 701 702 static { 703 DEFAULT_INSTANCE = new com.google.cloud.automl.v1.DocumentInputConfig(); 704 } 705 getDefaultInstance()706 public static com.google.cloud.automl.v1.DocumentInputConfig getDefaultInstance() { 707 return DEFAULT_INSTANCE; 708 } 709 710 private static final com.google.protobuf.Parser<DocumentInputConfig> PARSER = 711 new com.google.protobuf.AbstractParser<DocumentInputConfig>() { 712 @java.lang.Override 713 public DocumentInputConfig parsePartialFrom( 714 com.google.protobuf.CodedInputStream input, 715 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 716 throws com.google.protobuf.InvalidProtocolBufferException { 717 Builder builder = newBuilder(); 718 try { 719 builder.mergeFrom(input, extensionRegistry); 720 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 721 throw e.setUnfinishedMessage(builder.buildPartial()); 722 } catch (com.google.protobuf.UninitializedMessageException e) { 723 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 724 } catch (java.io.IOException e) { 725 throw new com.google.protobuf.InvalidProtocolBufferException(e) 726 .setUnfinishedMessage(builder.buildPartial()); 727 } 728 return builder.buildPartial(); 729 } 730 }; 731 parser()732 public static com.google.protobuf.Parser<DocumentInputConfig> parser() { 733 return PARSER; 734 } 735 736 @java.lang.Override getParserForType()737 public com.google.protobuf.Parser<DocumentInputConfig> getParserForType() { 738 return PARSER; 739 } 740 741 @java.lang.Override getDefaultInstanceForType()742 public com.google.cloud.automl.v1.DocumentInputConfig getDefaultInstanceForType() { 743 return DEFAULT_INSTANCE; 744 } 745 } 746