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