• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 for BatchPredict Action.
26  * The format of input depends on the ML problem of the model used for
27  * prediction. As input source the
28  * [gcs_source][google.cloud.automl.v1.InputConfig.gcs_source]
29  * is expected, unless specified otherwise.
30  * The formats are represented in EBNF with commas being literal and with
31  * non-terminal symbols defined near the end of this comment. The formats
32  * are:
33  * &lt;h4&gt;AutoML Vision&lt;/h4&gt;
34  * &lt;div class="ds-selector-tabs"&gt;&lt;section&gt;&lt;h5&gt;Classification&lt;/h5&gt;
35  * One or more CSV files where each line is a single column:
36  *     GCS_FILE_PATH
37  * The Google Cloud Storage location of an image of up to
38  * 30MB in size. Supported extensions: .JPEG, .GIF, .PNG.
39  * This path is treated as the ID in the batch predict output.
40  * Sample rows:
41  *     gs://folder/image1.jpeg
42  *     gs://folder/image2.gif
43  *     gs://folder/image3.png
44  * &lt;/section&gt;&lt;section&gt;&lt;h5&gt;Object Detection&lt;/h5&gt;
45  * One or more CSV files where each line is a single column:
46  *     GCS_FILE_PATH
47  * The Google Cloud Storage location of an image of up to
48  * 30MB in size. Supported extensions: .JPEG, .GIF, .PNG.
49  * This path is treated as the ID in the batch predict output.
50  * Sample rows:
51  *     gs://folder/image1.jpeg
52  *     gs://folder/image2.gif
53  *     gs://folder/image3.png
54  *   &lt;/section&gt;
55  * &lt;/div&gt;
56  * &lt;h4&gt;AutoML Video Intelligence&lt;/h4&gt;
57  * &lt;div class="ds-selector-tabs"&gt;&lt;section&gt;&lt;h5&gt;Classification&lt;/h5&gt;
58  * One or more CSV files where each line is a single column:
59  *     GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
60  * `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in
61  * size and up to 3h in duration duration.
62  * Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
63  * `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the
64  * length of the video, and the end time must be after the start time.
65  * Sample rows:
66  *     gs://folder/video1.mp4,10,40
67  *     gs://folder/video1.mp4,20,60
68  *     gs://folder/vid2.mov,0,inf
69  * &lt;/section&gt;&lt;section&gt;&lt;h5&gt;Object Tracking&lt;/h5&gt;
70  * One or more CSV files where each line is a single column:
71  *     GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
72  * `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in
73  * size and up to 3h in duration duration.
74  * Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
75  * `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the
76  * length of the video, and the end time must be after the start time.
77  * Sample rows:
78  *     gs://folder/video1.mp4,10,40
79  *     gs://folder/video1.mp4,20,60
80  *     gs://folder/vid2.mov,0,inf
81  *   &lt;/section&gt;
82  * &lt;/div&gt;
83  * &lt;h4&gt;AutoML Natural Language&lt;/h4&gt;
84  * &lt;div class="ds-selector-tabs"&gt;&lt;section&gt;&lt;h5&gt;Classification&lt;/h5&gt;
85  * One or more CSV files where each line is a single column:
86  *     GCS_FILE_PATH
87  * `GCS_FILE_PATH` is the Google Cloud Storage location of a text file.
88  * Supported file extensions: .TXT, .PDF, .TIF, .TIFF
89  * Text files can be no larger than 10MB in size.
90  * Sample rows:
91  *     gs://folder/text1.txt
92  *     gs://folder/text2.pdf
93  *     gs://folder/text3.tif
94  * &lt;/section&gt;&lt;section&gt;&lt;h5&gt;Sentiment Analysis&lt;/h5&gt;
95  * One or more CSV files where each line is a single column:
96  *     GCS_FILE_PATH
97  * `GCS_FILE_PATH` is the Google Cloud Storage location of a text file.
98  * Supported file extensions: .TXT, .PDF, .TIF, .TIFF
99  * Text files can be no larger than 128kB in size.
100  * Sample rows:
101  *     gs://folder/text1.txt
102  *     gs://folder/text2.pdf
103  *     gs://folder/text3.tif
104  * &lt;/section&gt;&lt;section&gt;&lt;h5&gt;Entity Extraction&lt;/h5&gt;
105  * One or more JSONL (JSON Lines) files that either provide inline text or
106  * documents. You can only use one format, either inline text or documents,
107  * for a single call to [AutoMl.BatchPredict].
108  * Each JSONL file contains a per line a proto that
109  * wraps a temporary user-assigned TextSnippet ID (string up to 2000
110  * characters long) called "id", a TextSnippet proto (in
111  * JSON representation) and zero or more TextFeature protos. Any given
112  * text snippet content must have 30,000 characters or less, and also
113  * be UTF-8 NFC encoded (ASCII already is). The IDs provided should be
114  * unique.
115  * Each document JSONL file contains, per line, a proto that wraps a Document
116  * proto with `input_config` set. Each document cannot exceed 2MB in size.
117  * Supported document extensions: .PDF, .TIF, .TIFF
118  * Each JSONL file must not exceed 100MB in size, and no more than 20
119  * JSONL files may be passed.
120  * Sample inline JSONL file (Shown with artificial line
121  * breaks. Actual line breaks are denoted by "&#92;n".):
122  *     {
123  *        "id": "my_first_id",
124  *        "text_snippet": { "content": "dog car cat"},
125  *        "text_features": [
126  *          {
127  *            "text_segment": {"start_offset": 4, "end_offset": 6},
128  *            "structural_type": PARAGRAPH,
129  *            "bounding_poly": {
130  *              "normalized_vertices": [
131  *                {"x": 0.1, "y": 0.1},
132  *                {"x": 0.1, "y": 0.3},
133  *                {"x": 0.3, "y": 0.3},
134  *                {"x": 0.3, "y": 0.1},
135  *              ]
136  *            },
137  *          }
138  *        ],
139  *      }&#92;n
140  *      {
141  *        "id": "2",
142  *        "text_snippet": {
143  *          "content": "Extended sample content",
144  *          "mime_type": "text/plain"
145  *        }
146  *      }
147  * Sample document JSONL file (Shown with artificial line
148  * breaks. Actual line breaks are denoted by "&#92;n".):
149  *      {
150  *        "document": {
151  *          "input_config": {
152  *            "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
153  *            }
154  *          }
155  *        }
156  *      }&#92;n
157  *      {
158  *        "document": {
159  *          "input_config": {
160  *            "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ]
161  *            }
162  *          }
163  *        }
164  *      }
165  *   &lt;/section&gt;
166  * &lt;/div&gt;
167  * &lt;h4&gt;AutoML Tables&lt;/h4&gt;&lt;div class="ui-datasection-main"&gt;&lt;section
168  * class="selected"&gt;
169  * See [Preparing your training
170  * data](https://cloud.google.com/automl-tables/docs/predict-batch) for more
171  * information.
172  * You can use either
173  * [gcs_source][google.cloud.automl.v1.BatchPredictInputConfig.gcs_source]
174  * or
175  * [bigquery_source][BatchPredictInputConfig.bigquery_source].
176  * **For gcs_source:**
177  * CSV file(s), each by itself 10GB or smaller and total size must be
178  * 100GB or smaller, where first file must have a header containing
179  * column names. If the first row of a subsequent file is the same as
180  * the header, then it is also treated as a header. All other rows
181  * contain values for the corresponding columns.
182  * The column names must contain the model's
183  * [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs]
184  * [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name]
185  * (order doesn't matter). The columns corresponding to the model's
186  * input feature column specs must contain values compatible with the
187  * column spec's data types. Prediction on all the rows, i.e. the CSV
188  * lines, will be attempted.
189  * Sample rows from a CSV file:
190  * &lt;pre&gt;
191  * "First Name","Last Name","Dob","Addresses"
192  * "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
193  * "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
194  * &lt;/pre&gt;
195  * **For bigquery_source:**
196  * The URI of a BigQuery table. The user data size of the BigQuery
197  * table must be 100GB or smaller.
198  * The column names must contain the model's
199  * [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs]
200  * [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name]
201  * (order doesn't matter). The columns corresponding to the model's
202  * input feature column specs must contain values compatible with the
203  * column spec's data types. Prediction on all the rows of the table
204  * will be attempted.
205  *   &lt;/section&gt;
206  * &lt;/div&gt;
207  * **Input field definitions:**
208  * `GCS_FILE_PATH`
209  * : The path to a file on Google Cloud Storage. For example,
210  *   "gs://folder/video.avi".
211  * `TIME_SEGMENT_START`
212  * : (`TIME_OFFSET`)
213  *   Expresses a beginning, inclusive, of a time segment
214  *   within an example that has a time dimension
215  *   (e.g. video).
216  * `TIME_SEGMENT_END`
217  * : (`TIME_OFFSET`)
218  *   Expresses an end, exclusive, of a time segment within
219  *   n example that has a time dimension (e.g. video).
220  * `TIME_OFFSET`
221  * : A number of seconds as measured from the start of an
222  *   example (e.g. video). Fractions are allowed, up to a
223  *   microsecond precision. "inf" is allowed, and it means the end
224  *   of the example.
225  *  **Errors:**
226  *  If any of the provided CSV files can't be parsed or if more than certain
227  *  percent of CSV rows cannot be processed then the operation fails and
228  *  prediction does not happen. Regardless of overall success or failure the
229  *  per-row failures, up to a certain count cap, will be listed in
230  *  Operation.metadata.partial_failures.
231  * </pre>
232  *
233  * Protobuf type {@code google.cloud.automl.v1.BatchPredictInputConfig}
234  */
235 public final class BatchPredictInputConfig extends com.google.protobuf.GeneratedMessageV3
236     implements
237     // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.BatchPredictInputConfig)
238     BatchPredictInputConfigOrBuilder {
239   private static final long serialVersionUID = 0L;
240   // Use BatchPredictInputConfig.newBuilder() to construct.
BatchPredictInputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)241   private BatchPredictInputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
242     super(builder);
243   }
244 
BatchPredictInputConfig()245   private BatchPredictInputConfig() {}
246 
247   @java.lang.Override
248   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)249   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
250     return new BatchPredictInputConfig();
251   }
252 
253   @java.lang.Override
getUnknownFields()254   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
255     return this.unknownFields;
256   }
257 
getDescriptor()258   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
259     return com.google.cloud.automl.v1.Io
260         .internal_static_google_cloud_automl_v1_BatchPredictInputConfig_descriptor;
261   }
262 
263   @java.lang.Override
264   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()265       internalGetFieldAccessorTable() {
266     return com.google.cloud.automl.v1.Io
267         .internal_static_google_cloud_automl_v1_BatchPredictInputConfig_fieldAccessorTable
268         .ensureFieldAccessorsInitialized(
269             com.google.cloud.automl.v1.BatchPredictInputConfig.class,
270             com.google.cloud.automl.v1.BatchPredictInputConfig.Builder.class);
271   }
272 
273   private int sourceCase_ = 0;
274   private java.lang.Object source_;
275 
276   public enum SourceCase
277       implements
278           com.google.protobuf.Internal.EnumLite,
279           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
280     GCS_SOURCE(1),
281     SOURCE_NOT_SET(0);
282     private final int value;
283 
SourceCase(int value)284     private SourceCase(int value) {
285       this.value = value;
286     }
287     /**
288      * @param value The number of the enum to look for.
289      * @return The enum associated with the given number.
290      * @deprecated Use {@link #forNumber(int)} instead.
291      */
292     @java.lang.Deprecated
valueOf(int value)293     public static SourceCase valueOf(int value) {
294       return forNumber(value);
295     }
296 
forNumber(int value)297     public static SourceCase forNumber(int value) {
298       switch (value) {
299         case 1:
300           return GCS_SOURCE;
301         case 0:
302           return SOURCE_NOT_SET;
303         default:
304           return null;
305       }
306     }
307 
getNumber()308     public int getNumber() {
309       return this.value;
310     }
311   };
312 
getSourceCase()313   public SourceCase getSourceCase() {
314     return SourceCase.forNumber(sourceCase_);
315   }
316 
317   public static final int GCS_SOURCE_FIELD_NUMBER = 1;
318   /**
319    *
320    *
321    * <pre>
322    * Required. The Google Cloud Storage location for the input content.
323    * </pre>
324    *
325    * <code>
326    * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
327    * </code>
328    *
329    * @return Whether the gcsSource field is set.
330    */
331   @java.lang.Override
hasGcsSource()332   public boolean hasGcsSource() {
333     return sourceCase_ == 1;
334   }
335   /**
336    *
337    *
338    * <pre>
339    * Required. The Google Cloud Storage location for the input content.
340    * </pre>
341    *
342    * <code>
343    * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
344    * </code>
345    *
346    * @return The gcsSource.
347    */
348   @java.lang.Override
getGcsSource()349   public com.google.cloud.automl.v1.GcsSource getGcsSource() {
350     if (sourceCase_ == 1) {
351       return (com.google.cloud.automl.v1.GcsSource) source_;
352     }
353     return com.google.cloud.automl.v1.GcsSource.getDefaultInstance();
354   }
355   /**
356    *
357    *
358    * <pre>
359    * Required. The Google Cloud Storage location for the input content.
360    * </pre>
361    *
362    * <code>
363    * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
364    * </code>
365    */
366   @java.lang.Override
getGcsSourceOrBuilder()367   public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
368     if (sourceCase_ == 1) {
369       return (com.google.cloud.automl.v1.GcsSource) source_;
370     }
371     return com.google.cloud.automl.v1.GcsSource.getDefaultInstance();
372   }
373 
374   private byte memoizedIsInitialized = -1;
375 
376   @java.lang.Override
isInitialized()377   public final boolean isInitialized() {
378     byte isInitialized = memoizedIsInitialized;
379     if (isInitialized == 1) return true;
380     if (isInitialized == 0) return false;
381 
382     memoizedIsInitialized = 1;
383     return true;
384   }
385 
386   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)387   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
388     if (sourceCase_ == 1) {
389       output.writeMessage(1, (com.google.cloud.automl.v1.GcsSource) source_);
390     }
391     getUnknownFields().writeTo(output);
392   }
393 
394   @java.lang.Override
getSerializedSize()395   public int getSerializedSize() {
396     int size = memoizedSize;
397     if (size != -1) return size;
398 
399     size = 0;
400     if (sourceCase_ == 1) {
401       size +=
402           com.google.protobuf.CodedOutputStream.computeMessageSize(
403               1, (com.google.cloud.automl.v1.GcsSource) source_);
404     }
405     size += getUnknownFields().getSerializedSize();
406     memoizedSize = size;
407     return size;
408   }
409 
410   @java.lang.Override
equals(final java.lang.Object obj)411   public boolean equals(final java.lang.Object obj) {
412     if (obj == this) {
413       return true;
414     }
415     if (!(obj instanceof com.google.cloud.automl.v1.BatchPredictInputConfig)) {
416       return super.equals(obj);
417     }
418     com.google.cloud.automl.v1.BatchPredictInputConfig other =
419         (com.google.cloud.automl.v1.BatchPredictInputConfig) obj;
420 
421     if (!getSourceCase().equals(other.getSourceCase())) return false;
422     switch (sourceCase_) {
423       case 1:
424         if (!getGcsSource().equals(other.getGcsSource())) return false;
425         break;
426       case 0:
427       default:
428     }
429     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
430     return true;
431   }
432 
433   @java.lang.Override
hashCode()434   public int hashCode() {
435     if (memoizedHashCode != 0) {
436       return memoizedHashCode;
437     }
438     int hash = 41;
439     hash = (19 * hash) + getDescriptor().hashCode();
440     switch (sourceCase_) {
441       case 1:
442         hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER;
443         hash = (53 * hash) + getGcsSource().hashCode();
444         break;
445       case 0:
446       default:
447     }
448     hash = (29 * hash) + getUnknownFields().hashCode();
449     memoizedHashCode = hash;
450     return hash;
451   }
452 
parseFrom( java.nio.ByteBuffer data)453   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(
454       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
455     return PARSER.parseFrom(data);
456   }
457 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)458   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(
459       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
460       throws com.google.protobuf.InvalidProtocolBufferException {
461     return PARSER.parseFrom(data, extensionRegistry);
462   }
463 
parseFrom( com.google.protobuf.ByteString data)464   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(
465       com.google.protobuf.ByteString data)
466       throws com.google.protobuf.InvalidProtocolBufferException {
467     return PARSER.parseFrom(data);
468   }
469 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)470   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(
471       com.google.protobuf.ByteString data,
472       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
473       throws com.google.protobuf.InvalidProtocolBufferException {
474     return PARSER.parseFrom(data, extensionRegistry);
475   }
476 
parseFrom(byte[] data)477   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(byte[] data)
478       throws com.google.protobuf.InvalidProtocolBufferException {
479     return PARSER.parseFrom(data);
480   }
481 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)482   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(
483       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
484       throws com.google.protobuf.InvalidProtocolBufferException {
485     return PARSER.parseFrom(data, extensionRegistry);
486   }
487 
parseFrom( java.io.InputStream input)488   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(
489       java.io.InputStream input) throws java.io.IOException {
490     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
491   }
492 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)493   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(
494       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
495       throws java.io.IOException {
496     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
497         PARSER, input, extensionRegistry);
498   }
499 
parseDelimitedFrom( java.io.InputStream input)500   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseDelimitedFrom(
501       java.io.InputStream input) throws java.io.IOException {
502     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
503   }
504 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)505   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseDelimitedFrom(
506       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
507       throws java.io.IOException {
508     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
509         PARSER, input, extensionRegistry);
510   }
511 
parseFrom( com.google.protobuf.CodedInputStream input)512   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(
513       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
514     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
515   }
516 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)517   public static com.google.cloud.automl.v1.BatchPredictInputConfig parseFrom(
518       com.google.protobuf.CodedInputStream input,
519       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
520       throws java.io.IOException {
521     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
522         PARSER, input, extensionRegistry);
523   }
524 
525   @java.lang.Override
newBuilderForType()526   public Builder newBuilderForType() {
527     return newBuilder();
528   }
529 
newBuilder()530   public static Builder newBuilder() {
531     return DEFAULT_INSTANCE.toBuilder();
532   }
533 
newBuilder(com.google.cloud.automl.v1.BatchPredictInputConfig prototype)534   public static Builder newBuilder(com.google.cloud.automl.v1.BatchPredictInputConfig prototype) {
535     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
536   }
537 
538   @java.lang.Override
toBuilder()539   public Builder toBuilder() {
540     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
541   }
542 
543   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)544   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
545     Builder builder = new Builder(parent);
546     return builder;
547   }
548   /**
549    *
550    *
551    * <pre>
552    * Input configuration for BatchPredict Action.
553    * The format of input depends on the ML problem of the model used for
554    * prediction. As input source the
555    * [gcs_source][google.cloud.automl.v1.InputConfig.gcs_source]
556    * is expected, unless specified otherwise.
557    * The formats are represented in EBNF with commas being literal and with
558    * non-terminal symbols defined near the end of this comment. The formats
559    * are:
560    * &lt;h4&gt;AutoML Vision&lt;/h4&gt;
561    * &lt;div class="ds-selector-tabs"&gt;&lt;section&gt;&lt;h5&gt;Classification&lt;/h5&gt;
562    * One or more CSV files where each line is a single column:
563    *     GCS_FILE_PATH
564    * The Google Cloud Storage location of an image of up to
565    * 30MB in size. Supported extensions: .JPEG, .GIF, .PNG.
566    * This path is treated as the ID in the batch predict output.
567    * Sample rows:
568    *     gs://folder/image1.jpeg
569    *     gs://folder/image2.gif
570    *     gs://folder/image3.png
571    * &lt;/section&gt;&lt;section&gt;&lt;h5&gt;Object Detection&lt;/h5&gt;
572    * One or more CSV files where each line is a single column:
573    *     GCS_FILE_PATH
574    * The Google Cloud Storage location of an image of up to
575    * 30MB in size. Supported extensions: .JPEG, .GIF, .PNG.
576    * This path is treated as the ID in the batch predict output.
577    * Sample rows:
578    *     gs://folder/image1.jpeg
579    *     gs://folder/image2.gif
580    *     gs://folder/image3.png
581    *   &lt;/section&gt;
582    * &lt;/div&gt;
583    * &lt;h4&gt;AutoML Video Intelligence&lt;/h4&gt;
584    * &lt;div class="ds-selector-tabs"&gt;&lt;section&gt;&lt;h5&gt;Classification&lt;/h5&gt;
585    * One or more CSV files where each line is a single column:
586    *     GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
587    * `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in
588    * size and up to 3h in duration duration.
589    * Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
590    * `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the
591    * length of the video, and the end time must be after the start time.
592    * Sample rows:
593    *     gs://folder/video1.mp4,10,40
594    *     gs://folder/video1.mp4,20,60
595    *     gs://folder/vid2.mov,0,inf
596    * &lt;/section&gt;&lt;section&gt;&lt;h5&gt;Object Tracking&lt;/h5&gt;
597    * One or more CSV files where each line is a single column:
598    *     GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
599    * `GCS_FILE_PATH` is the Google Cloud Storage location of video up to 50GB in
600    * size and up to 3h in duration duration.
601    * Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
602    * `TIME_SEGMENT_START` and `TIME_SEGMENT_END` must be within the
603    * length of the video, and the end time must be after the start time.
604    * Sample rows:
605    *     gs://folder/video1.mp4,10,40
606    *     gs://folder/video1.mp4,20,60
607    *     gs://folder/vid2.mov,0,inf
608    *   &lt;/section&gt;
609    * &lt;/div&gt;
610    * &lt;h4&gt;AutoML Natural Language&lt;/h4&gt;
611    * &lt;div class="ds-selector-tabs"&gt;&lt;section&gt;&lt;h5&gt;Classification&lt;/h5&gt;
612    * One or more CSV files where each line is a single column:
613    *     GCS_FILE_PATH
614    * `GCS_FILE_PATH` is the Google Cloud Storage location of a text file.
615    * Supported file extensions: .TXT, .PDF, .TIF, .TIFF
616    * Text files can be no larger than 10MB in size.
617    * Sample rows:
618    *     gs://folder/text1.txt
619    *     gs://folder/text2.pdf
620    *     gs://folder/text3.tif
621    * &lt;/section&gt;&lt;section&gt;&lt;h5&gt;Sentiment Analysis&lt;/h5&gt;
622    * One or more CSV files where each line is a single column:
623    *     GCS_FILE_PATH
624    * `GCS_FILE_PATH` is the Google Cloud Storage location of a text file.
625    * Supported file extensions: .TXT, .PDF, .TIF, .TIFF
626    * Text files can be no larger than 128kB in size.
627    * Sample rows:
628    *     gs://folder/text1.txt
629    *     gs://folder/text2.pdf
630    *     gs://folder/text3.tif
631    * &lt;/section&gt;&lt;section&gt;&lt;h5&gt;Entity Extraction&lt;/h5&gt;
632    * One or more JSONL (JSON Lines) files that either provide inline text or
633    * documents. You can only use one format, either inline text or documents,
634    * for a single call to [AutoMl.BatchPredict].
635    * Each JSONL file contains a per line a proto that
636    * wraps a temporary user-assigned TextSnippet ID (string up to 2000
637    * characters long) called "id", a TextSnippet proto (in
638    * JSON representation) and zero or more TextFeature protos. Any given
639    * text snippet content must have 30,000 characters or less, and also
640    * be UTF-8 NFC encoded (ASCII already is). The IDs provided should be
641    * unique.
642    * Each document JSONL file contains, per line, a proto that wraps a Document
643    * proto with `input_config` set. Each document cannot exceed 2MB in size.
644    * Supported document extensions: .PDF, .TIF, .TIFF
645    * Each JSONL file must not exceed 100MB in size, and no more than 20
646    * JSONL files may be passed.
647    * Sample inline JSONL file (Shown with artificial line
648    * breaks. Actual line breaks are denoted by "&#92;n".):
649    *     {
650    *        "id": "my_first_id",
651    *        "text_snippet": { "content": "dog car cat"},
652    *        "text_features": [
653    *          {
654    *            "text_segment": {"start_offset": 4, "end_offset": 6},
655    *            "structural_type": PARAGRAPH,
656    *            "bounding_poly": {
657    *              "normalized_vertices": [
658    *                {"x": 0.1, "y": 0.1},
659    *                {"x": 0.1, "y": 0.3},
660    *                {"x": 0.3, "y": 0.3},
661    *                {"x": 0.3, "y": 0.1},
662    *              ]
663    *            },
664    *          }
665    *        ],
666    *      }&#92;n
667    *      {
668    *        "id": "2",
669    *        "text_snippet": {
670    *          "content": "Extended sample content",
671    *          "mime_type": "text/plain"
672    *        }
673    *      }
674    * Sample document JSONL file (Shown with artificial line
675    * breaks. Actual line breaks are denoted by "&#92;n".):
676    *      {
677    *        "document": {
678    *          "input_config": {
679    *            "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
680    *            }
681    *          }
682    *        }
683    *      }&#92;n
684    *      {
685    *        "document": {
686    *          "input_config": {
687    *            "gcs_source": { "input_uris": [ "gs://folder/document2.tif" ]
688    *            }
689    *          }
690    *        }
691    *      }
692    *   &lt;/section&gt;
693    * &lt;/div&gt;
694    * &lt;h4&gt;AutoML Tables&lt;/h4&gt;&lt;div class="ui-datasection-main"&gt;&lt;section
695    * class="selected"&gt;
696    * See [Preparing your training
697    * data](https://cloud.google.com/automl-tables/docs/predict-batch) for more
698    * information.
699    * You can use either
700    * [gcs_source][google.cloud.automl.v1.BatchPredictInputConfig.gcs_source]
701    * or
702    * [bigquery_source][BatchPredictInputConfig.bigquery_source].
703    * **For gcs_source:**
704    * CSV file(s), each by itself 10GB or smaller and total size must be
705    * 100GB or smaller, where first file must have a header containing
706    * column names. If the first row of a subsequent file is the same as
707    * the header, then it is also treated as a header. All other rows
708    * contain values for the corresponding columns.
709    * The column names must contain the model's
710    * [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs]
711    * [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name]
712    * (order doesn't matter). The columns corresponding to the model's
713    * input feature column specs must contain values compatible with the
714    * column spec's data types. Prediction on all the rows, i.e. the CSV
715    * lines, will be attempted.
716    * Sample rows from a CSV file:
717    * &lt;pre&gt;
718    * "First Name","Last Name","Dob","Addresses"
719    * "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
720    * "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
721    * &lt;/pre&gt;
722    * **For bigquery_source:**
723    * The URI of a BigQuery table. The user data size of the BigQuery
724    * table must be 100GB or smaller.
725    * The column names must contain the model's
726    * [input_feature_column_specs'][google.cloud.automl.v1.TablesModelMetadata.input_feature_column_specs]
727    * [display_name-s][google.cloud.automl.v1.ColumnSpec.display_name]
728    * (order doesn't matter). The columns corresponding to the model's
729    * input feature column specs must contain values compatible with the
730    * column spec's data types. Prediction on all the rows of the table
731    * will be attempted.
732    *   &lt;/section&gt;
733    * &lt;/div&gt;
734    * **Input field definitions:**
735    * `GCS_FILE_PATH`
736    * : The path to a file on Google Cloud Storage. For example,
737    *   "gs://folder/video.avi".
738    * `TIME_SEGMENT_START`
739    * : (`TIME_OFFSET`)
740    *   Expresses a beginning, inclusive, of a time segment
741    *   within an example that has a time dimension
742    *   (e.g. video).
743    * `TIME_SEGMENT_END`
744    * : (`TIME_OFFSET`)
745    *   Expresses an end, exclusive, of a time segment within
746    *   n example that has a time dimension (e.g. video).
747    * `TIME_OFFSET`
748    * : A number of seconds as measured from the start of an
749    *   example (e.g. video). Fractions are allowed, up to a
750    *   microsecond precision. "inf" is allowed, and it means the end
751    *   of the example.
752    *  **Errors:**
753    *  If any of the provided CSV files can't be parsed or if more than certain
754    *  percent of CSV rows cannot be processed then the operation fails and
755    *  prediction does not happen. Regardless of overall success or failure the
756    *  per-row failures, up to a certain count cap, will be listed in
757    *  Operation.metadata.partial_failures.
758    * </pre>
759    *
760    * Protobuf type {@code google.cloud.automl.v1.BatchPredictInputConfig}
761    */
762   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
763       implements
764       // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.BatchPredictInputConfig)
765       com.google.cloud.automl.v1.BatchPredictInputConfigOrBuilder {
getDescriptor()766     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
767       return com.google.cloud.automl.v1.Io
768           .internal_static_google_cloud_automl_v1_BatchPredictInputConfig_descriptor;
769     }
770 
771     @java.lang.Override
772     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()773         internalGetFieldAccessorTable() {
774       return com.google.cloud.automl.v1.Io
775           .internal_static_google_cloud_automl_v1_BatchPredictInputConfig_fieldAccessorTable
776           .ensureFieldAccessorsInitialized(
777               com.google.cloud.automl.v1.BatchPredictInputConfig.class,
778               com.google.cloud.automl.v1.BatchPredictInputConfig.Builder.class);
779     }
780 
781     // Construct using com.google.cloud.automl.v1.BatchPredictInputConfig.newBuilder()
Builder()782     private Builder() {}
783 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)784     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
785       super(parent);
786     }
787 
788     @java.lang.Override
clear()789     public Builder clear() {
790       super.clear();
791       bitField0_ = 0;
792       if (gcsSourceBuilder_ != null) {
793         gcsSourceBuilder_.clear();
794       }
795       sourceCase_ = 0;
796       source_ = null;
797       return this;
798     }
799 
800     @java.lang.Override
getDescriptorForType()801     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
802       return com.google.cloud.automl.v1.Io
803           .internal_static_google_cloud_automl_v1_BatchPredictInputConfig_descriptor;
804     }
805 
806     @java.lang.Override
getDefaultInstanceForType()807     public com.google.cloud.automl.v1.BatchPredictInputConfig getDefaultInstanceForType() {
808       return com.google.cloud.automl.v1.BatchPredictInputConfig.getDefaultInstance();
809     }
810 
811     @java.lang.Override
build()812     public com.google.cloud.automl.v1.BatchPredictInputConfig build() {
813       com.google.cloud.automl.v1.BatchPredictInputConfig result = buildPartial();
814       if (!result.isInitialized()) {
815         throw newUninitializedMessageException(result);
816       }
817       return result;
818     }
819 
820     @java.lang.Override
buildPartial()821     public com.google.cloud.automl.v1.BatchPredictInputConfig buildPartial() {
822       com.google.cloud.automl.v1.BatchPredictInputConfig result =
823           new com.google.cloud.automl.v1.BatchPredictInputConfig(this);
824       if (bitField0_ != 0) {
825         buildPartial0(result);
826       }
827       buildPartialOneofs(result);
828       onBuilt();
829       return result;
830     }
831 
buildPartial0(com.google.cloud.automl.v1.BatchPredictInputConfig result)832     private void buildPartial0(com.google.cloud.automl.v1.BatchPredictInputConfig result) {
833       int from_bitField0_ = bitField0_;
834     }
835 
buildPartialOneofs(com.google.cloud.automl.v1.BatchPredictInputConfig result)836     private void buildPartialOneofs(com.google.cloud.automl.v1.BatchPredictInputConfig result) {
837       result.sourceCase_ = sourceCase_;
838       result.source_ = this.source_;
839       if (sourceCase_ == 1 && gcsSourceBuilder_ != null) {
840         result.source_ = gcsSourceBuilder_.build();
841       }
842     }
843 
844     @java.lang.Override
clone()845     public Builder clone() {
846       return super.clone();
847     }
848 
849     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)850     public Builder setField(
851         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
852       return super.setField(field, value);
853     }
854 
855     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)856     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
857       return super.clearField(field);
858     }
859 
860     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)861     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
862       return super.clearOneof(oneof);
863     }
864 
865     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)866     public Builder setRepeatedField(
867         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
868       return super.setRepeatedField(field, index, value);
869     }
870 
871     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)872     public Builder addRepeatedField(
873         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
874       return super.addRepeatedField(field, value);
875     }
876 
877     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)878     public Builder mergeFrom(com.google.protobuf.Message other) {
879       if (other instanceof com.google.cloud.automl.v1.BatchPredictInputConfig) {
880         return mergeFrom((com.google.cloud.automl.v1.BatchPredictInputConfig) other);
881       } else {
882         super.mergeFrom(other);
883         return this;
884       }
885     }
886 
mergeFrom(com.google.cloud.automl.v1.BatchPredictInputConfig other)887     public Builder mergeFrom(com.google.cloud.automl.v1.BatchPredictInputConfig other) {
888       if (other == com.google.cloud.automl.v1.BatchPredictInputConfig.getDefaultInstance())
889         return this;
890       switch (other.getSourceCase()) {
891         case GCS_SOURCE:
892           {
893             mergeGcsSource(other.getGcsSource());
894             break;
895           }
896         case SOURCE_NOT_SET:
897           {
898             break;
899           }
900       }
901       this.mergeUnknownFields(other.getUnknownFields());
902       onChanged();
903       return this;
904     }
905 
906     @java.lang.Override
isInitialized()907     public final boolean isInitialized() {
908       return true;
909     }
910 
911     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)912     public Builder mergeFrom(
913         com.google.protobuf.CodedInputStream input,
914         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
915         throws java.io.IOException {
916       if (extensionRegistry == null) {
917         throw new java.lang.NullPointerException();
918       }
919       try {
920         boolean done = false;
921         while (!done) {
922           int tag = input.readTag();
923           switch (tag) {
924             case 0:
925               done = true;
926               break;
927             case 10:
928               {
929                 input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry);
930                 sourceCase_ = 1;
931                 break;
932               } // case 10
933             default:
934               {
935                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
936                   done = true; // was an endgroup tag
937                 }
938                 break;
939               } // default:
940           } // switch (tag)
941         } // while (!done)
942       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
943         throw e.unwrapIOException();
944       } finally {
945         onChanged();
946       } // finally
947       return this;
948     }
949 
950     private int sourceCase_ = 0;
951     private java.lang.Object source_;
952 
getSourceCase()953     public SourceCase getSourceCase() {
954       return SourceCase.forNumber(sourceCase_);
955     }
956 
clearSource()957     public Builder clearSource() {
958       sourceCase_ = 0;
959       source_ = null;
960       onChanged();
961       return this;
962     }
963 
964     private int bitField0_;
965 
966     private com.google.protobuf.SingleFieldBuilderV3<
967             com.google.cloud.automl.v1.GcsSource,
968             com.google.cloud.automl.v1.GcsSource.Builder,
969             com.google.cloud.automl.v1.GcsSourceOrBuilder>
970         gcsSourceBuilder_;
971     /**
972      *
973      *
974      * <pre>
975      * Required. The Google Cloud Storage location for the input content.
976      * </pre>
977      *
978      * <code>
979      * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
980      * </code>
981      *
982      * @return Whether the gcsSource field is set.
983      */
984     @java.lang.Override
hasGcsSource()985     public boolean hasGcsSource() {
986       return sourceCase_ == 1;
987     }
988     /**
989      *
990      *
991      * <pre>
992      * Required. The Google Cloud Storage location for the input content.
993      * </pre>
994      *
995      * <code>
996      * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
997      * </code>
998      *
999      * @return The gcsSource.
1000      */
1001     @java.lang.Override
getGcsSource()1002     public com.google.cloud.automl.v1.GcsSource getGcsSource() {
1003       if (gcsSourceBuilder_ == null) {
1004         if (sourceCase_ == 1) {
1005           return (com.google.cloud.automl.v1.GcsSource) source_;
1006         }
1007         return com.google.cloud.automl.v1.GcsSource.getDefaultInstance();
1008       } else {
1009         if (sourceCase_ == 1) {
1010           return gcsSourceBuilder_.getMessage();
1011         }
1012         return com.google.cloud.automl.v1.GcsSource.getDefaultInstance();
1013       }
1014     }
1015     /**
1016      *
1017      *
1018      * <pre>
1019      * Required. The Google Cloud Storage location for the input content.
1020      * </pre>
1021      *
1022      * <code>
1023      * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
1024      * </code>
1025      */
setGcsSource(com.google.cloud.automl.v1.GcsSource value)1026     public Builder setGcsSource(com.google.cloud.automl.v1.GcsSource value) {
1027       if (gcsSourceBuilder_ == null) {
1028         if (value == null) {
1029           throw new NullPointerException();
1030         }
1031         source_ = value;
1032         onChanged();
1033       } else {
1034         gcsSourceBuilder_.setMessage(value);
1035       }
1036       sourceCase_ = 1;
1037       return this;
1038     }
1039     /**
1040      *
1041      *
1042      * <pre>
1043      * Required. The Google Cloud Storage location for the input content.
1044      * </pre>
1045      *
1046      * <code>
1047      * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
1048      * </code>
1049      */
setGcsSource(com.google.cloud.automl.v1.GcsSource.Builder builderForValue)1050     public Builder setGcsSource(com.google.cloud.automl.v1.GcsSource.Builder builderForValue) {
1051       if (gcsSourceBuilder_ == null) {
1052         source_ = builderForValue.build();
1053         onChanged();
1054       } else {
1055         gcsSourceBuilder_.setMessage(builderForValue.build());
1056       }
1057       sourceCase_ = 1;
1058       return this;
1059     }
1060     /**
1061      *
1062      *
1063      * <pre>
1064      * Required. The Google Cloud Storage location for the input content.
1065      * </pre>
1066      *
1067      * <code>
1068      * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
1069      * </code>
1070      */
mergeGcsSource(com.google.cloud.automl.v1.GcsSource value)1071     public Builder mergeGcsSource(com.google.cloud.automl.v1.GcsSource value) {
1072       if (gcsSourceBuilder_ == null) {
1073         if (sourceCase_ == 1
1074             && source_ != com.google.cloud.automl.v1.GcsSource.getDefaultInstance()) {
1075           source_ =
1076               com.google.cloud.automl.v1.GcsSource.newBuilder(
1077                       (com.google.cloud.automl.v1.GcsSource) source_)
1078                   .mergeFrom(value)
1079                   .buildPartial();
1080         } else {
1081           source_ = value;
1082         }
1083         onChanged();
1084       } else {
1085         if (sourceCase_ == 1) {
1086           gcsSourceBuilder_.mergeFrom(value);
1087         } else {
1088           gcsSourceBuilder_.setMessage(value);
1089         }
1090       }
1091       sourceCase_ = 1;
1092       return this;
1093     }
1094     /**
1095      *
1096      *
1097      * <pre>
1098      * Required. The Google Cloud Storage location for the input content.
1099      * </pre>
1100      *
1101      * <code>
1102      * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
1103      * </code>
1104      */
clearGcsSource()1105     public Builder clearGcsSource() {
1106       if (gcsSourceBuilder_ == null) {
1107         if (sourceCase_ == 1) {
1108           sourceCase_ = 0;
1109           source_ = null;
1110           onChanged();
1111         }
1112       } else {
1113         if (sourceCase_ == 1) {
1114           sourceCase_ = 0;
1115           source_ = null;
1116         }
1117         gcsSourceBuilder_.clear();
1118       }
1119       return this;
1120     }
1121     /**
1122      *
1123      *
1124      * <pre>
1125      * Required. The Google Cloud Storage location for the input content.
1126      * </pre>
1127      *
1128      * <code>
1129      * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
1130      * </code>
1131      */
getGcsSourceBuilder()1132     public com.google.cloud.automl.v1.GcsSource.Builder getGcsSourceBuilder() {
1133       return getGcsSourceFieldBuilder().getBuilder();
1134     }
1135     /**
1136      *
1137      *
1138      * <pre>
1139      * Required. The Google Cloud Storage location for the input content.
1140      * </pre>
1141      *
1142      * <code>
1143      * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
1144      * </code>
1145      */
1146     @java.lang.Override
getGcsSourceOrBuilder()1147     public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
1148       if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) {
1149         return gcsSourceBuilder_.getMessageOrBuilder();
1150       } else {
1151         if (sourceCase_ == 1) {
1152           return (com.google.cloud.automl.v1.GcsSource) source_;
1153         }
1154         return com.google.cloud.automl.v1.GcsSource.getDefaultInstance();
1155       }
1156     }
1157     /**
1158      *
1159      *
1160      * <pre>
1161      * Required. The Google Cloud Storage location for the input content.
1162      * </pre>
1163      *
1164      * <code>
1165      * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED];
1166      * </code>
1167      */
1168     private com.google.protobuf.SingleFieldBuilderV3<
1169             com.google.cloud.automl.v1.GcsSource,
1170             com.google.cloud.automl.v1.GcsSource.Builder,
1171             com.google.cloud.automl.v1.GcsSourceOrBuilder>
getGcsSourceFieldBuilder()1172         getGcsSourceFieldBuilder() {
1173       if (gcsSourceBuilder_ == null) {
1174         if (!(sourceCase_ == 1)) {
1175           source_ = com.google.cloud.automl.v1.GcsSource.getDefaultInstance();
1176         }
1177         gcsSourceBuilder_ =
1178             new com.google.protobuf.SingleFieldBuilderV3<
1179                 com.google.cloud.automl.v1.GcsSource,
1180                 com.google.cloud.automl.v1.GcsSource.Builder,
1181                 com.google.cloud.automl.v1.GcsSourceOrBuilder>(
1182                 (com.google.cloud.automl.v1.GcsSource) source_, getParentForChildren(), isClean());
1183         source_ = null;
1184       }
1185       sourceCase_ = 1;
1186       onChanged();
1187       return gcsSourceBuilder_;
1188     }
1189 
1190     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1191     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1192       return super.setUnknownFields(unknownFields);
1193     }
1194 
1195     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1196     public final Builder mergeUnknownFields(
1197         final com.google.protobuf.UnknownFieldSet unknownFields) {
1198       return super.mergeUnknownFields(unknownFields);
1199     }
1200 
1201     // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.BatchPredictInputConfig)
1202   }
1203 
1204   // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.BatchPredictInputConfig)
1205   private static final com.google.cloud.automl.v1.BatchPredictInputConfig DEFAULT_INSTANCE;
1206 
1207   static {
1208     DEFAULT_INSTANCE = new com.google.cloud.automl.v1.BatchPredictInputConfig();
1209   }
1210 
getDefaultInstance()1211   public static com.google.cloud.automl.v1.BatchPredictInputConfig getDefaultInstance() {
1212     return DEFAULT_INSTANCE;
1213   }
1214 
1215   private static final com.google.protobuf.Parser<BatchPredictInputConfig> PARSER =
1216       new com.google.protobuf.AbstractParser<BatchPredictInputConfig>() {
1217         @java.lang.Override
1218         public BatchPredictInputConfig parsePartialFrom(
1219             com.google.protobuf.CodedInputStream input,
1220             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1221             throws com.google.protobuf.InvalidProtocolBufferException {
1222           Builder builder = newBuilder();
1223           try {
1224             builder.mergeFrom(input, extensionRegistry);
1225           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1226             throw e.setUnfinishedMessage(builder.buildPartial());
1227           } catch (com.google.protobuf.UninitializedMessageException e) {
1228             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1229           } catch (java.io.IOException e) {
1230             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1231                 .setUnfinishedMessage(builder.buildPartial());
1232           }
1233           return builder.buildPartial();
1234         }
1235       };
1236 
parser()1237   public static com.google.protobuf.Parser<BatchPredictInputConfig> parser() {
1238     return PARSER;
1239   }
1240 
1241   @java.lang.Override
getParserForType()1242   public com.google.protobuf.Parser<BatchPredictInputConfig> getParserForType() {
1243     return PARSER;
1244   }
1245 
1246   @java.lang.Override
getDefaultInstanceForType()1247   public com.google.cloud.automl.v1.BatchPredictInputConfig getDefaultInstanceForType() {
1248     return DEFAULT_INSTANCE;
1249   }
1250 }
1251