• 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/v1beta1/table_spec.proto
18 
19 package com.google.cloud.automl.v1beta1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * A specification of a relational table.
26  * The table's schema is represented via its child column specs. It is
27  * pre-populated as part of ImportData by schema inference algorithm, the
28  * version of which is a required parameter of ImportData InputConfig.
29  * Note: While working with a table, at times the schema may be
30  * inconsistent with the data in the table (e.g. string in a FLOAT64 column).
31  * The consistency validation is done upon creation of a model.
32  * Used by:
33  *   *   Tables
34  * </pre>
35  *
36  * Protobuf type {@code google.cloud.automl.v1beta1.TableSpec}
37  */
38 public final class TableSpec extends com.google.protobuf.GeneratedMessageV3
39     implements
40     // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TableSpec)
41     TableSpecOrBuilder {
42   private static final long serialVersionUID = 0L;
43   // Use TableSpec.newBuilder() to construct.
TableSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)44   private TableSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
45     super(builder);
46   }
47 
TableSpec()48   private TableSpec() {
49     name_ = "";
50     timeColumnSpecId_ = "";
51     inputConfigs_ = java.util.Collections.emptyList();
52     etag_ = "";
53   }
54 
55   @java.lang.Override
56   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)57   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
58     return new TableSpec();
59   }
60 
61   @java.lang.Override
getUnknownFields()62   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
63     return this.unknownFields;
64   }
65 
getDescriptor()66   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
67     return com.google.cloud.automl.v1beta1.TableSpecOuterClass
68         .internal_static_google_cloud_automl_v1beta1_TableSpec_descriptor;
69   }
70 
71   @java.lang.Override
72   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()73       internalGetFieldAccessorTable() {
74     return com.google.cloud.automl.v1beta1.TableSpecOuterClass
75         .internal_static_google_cloud_automl_v1beta1_TableSpec_fieldAccessorTable
76         .ensureFieldAccessorsInitialized(
77             com.google.cloud.automl.v1beta1.TableSpec.class,
78             com.google.cloud.automl.v1beta1.TableSpec.Builder.class);
79   }
80 
81   public static final int NAME_FIELD_NUMBER = 1;
82 
83   @SuppressWarnings("serial")
84   private volatile java.lang.Object name_ = "";
85   /**
86    *
87    *
88    * <pre>
89    * Output only. The resource name of the table spec.
90    * Form:
91    * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
92    * </pre>
93    *
94    * <code>string name = 1;</code>
95    *
96    * @return The name.
97    */
98   @java.lang.Override
getName()99   public java.lang.String getName() {
100     java.lang.Object ref = name_;
101     if (ref instanceof java.lang.String) {
102       return (java.lang.String) ref;
103     } else {
104       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
105       java.lang.String s = bs.toStringUtf8();
106       name_ = s;
107       return s;
108     }
109   }
110   /**
111    *
112    *
113    * <pre>
114    * Output only. The resource name of the table spec.
115    * Form:
116    * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
117    * </pre>
118    *
119    * <code>string name = 1;</code>
120    *
121    * @return The bytes for name.
122    */
123   @java.lang.Override
getNameBytes()124   public com.google.protobuf.ByteString getNameBytes() {
125     java.lang.Object ref = name_;
126     if (ref instanceof java.lang.String) {
127       com.google.protobuf.ByteString b =
128           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
129       name_ = b;
130       return b;
131     } else {
132       return (com.google.protobuf.ByteString) ref;
133     }
134   }
135 
136   public static final int TIME_COLUMN_SPEC_ID_FIELD_NUMBER = 2;
137 
138   @SuppressWarnings("serial")
139   private volatile java.lang.Object timeColumnSpecId_ = "";
140   /**
141    *
142    *
143    * <pre>
144    * column_spec_id of the time column. Only used if the parent dataset's
145    * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
146    * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
147    * those in between to VALIDATE.
148    * Required type: TIMESTAMP.
149    * If both this column and ml_use_column are not set, then ML use of all rows
150    * will be assigned by AutoML. NOTE: Updates of this field will instantly
151    * affect any other users concurrently working with the dataset.
152    * </pre>
153    *
154    * <code>string time_column_spec_id = 2;</code>
155    *
156    * @return The timeColumnSpecId.
157    */
158   @java.lang.Override
getTimeColumnSpecId()159   public java.lang.String getTimeColumnSpecId() {
160     java.lang.Object ref = timeColumnSpecId_;
161     if (ref instanceof java.lang.String) {
162       return (java.lang.String) ref;
163     } else {
164       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
165       java.lang.String s = bs.toStringUtf8();
166       timeColumnSpecId_ = s;
167       return s;
168     }
169   }
170   /**
171    *
172    *
173    * <pre>
174    * column_spec_id of the time column. Only used if the parent dataset's
175    * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
176    * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
177    * those in between to VALIDATE.
178    * Required type: TIMESTAMP.
179    * If both this column and ml_use_column are not set, then ML use of all rows
180    * will be assigned by AutoML. NOTE: Updates of this field will instantly
181    * affect any other users concurrently working with the dataset.
182    * </pre>
183    *
184    * <code>string time_column_spec_id = 2;</code>
185    *
186    * @return The bytes for timeColumnSpecId.
187    */
188   @java.lang.Override
getTimeColumnSpecIdBytes()189   public com.google.protobuf.ByteString getTimeColumnSpecIdBytes() {
190     java.lang.Object ref = timeColumnSpecId_;
191     if (ref instanceof java.lang.String) {
192       com.google.protobuf.ByteString b =
193           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
194       timeColumnSpecId_ = b;
195       return b;
196     } else {
197       return (com.google.protobuf.ByteString) ref;
198     }
199   }
200 
201   public static final int ROW_COUNT_FIELD_NUMBER = 3;
202   private long rowCount_ = 0L;
203   /**
204    *
205    *
206    * <pre>
207    * Output only. The number of rows (i.e. examples) in the table.
208    * </pre>
209    *
210    * <code>int64 row_count = 3;</code>
211    *
212    * @return The rowCount.
213    */
214   @java.lang.Override
getRowCount()215   public long getRowCount() {
216     return rowCount_;
217   }
218 
219   public static final int VALID_ROW_COUNT_FIELD_NUMBER = 4;
220   private long validRowCount_ = 0L;
221   /**
222    *
223    *
224    * <pre>
225    * Output only. The number of valid rows (i.e. without values that don't match
226    * DataType-s of their columns).
227    * </pre>
228    *
229    * <code>int64 valid_row_count = 4;</code>
230    *
231    * @return The validRowCount.
232    */
233   @java.lang.Override
getValidRowCount()234   public long getValidRowCount() {
235     return validRowCount_;
236   }
237 
238   public static final int COLUMN_COUNT_FIELD_NUMBER = 7;
239   private long columnCount_ = 0L;
240   /**
241    *
242    *
243    * <pre>
244    * Output only. The number of columns of the table. That is, the number of
245    * child ColumnSpec-s.
246    * </pre>
247    *
248    * <code>int64 column_count = 7;</code>
249    *
250    * @return The columnCount.
251    */
252   @java.lang.Override
getColumnCount()253   public long getColumnCount() {
254     return columnCount_;
255   }
256 
257   public static final int INPUT_CONFIGS_FIELD_NUMBER = 5;
258 
259   @SuppressWarnings("serial")
260   private java.util.List<com.google.cloud.automl.v1beta1.InputConfig> inputConfigs_;
261   /**
262    *
263    *
264    * <pre>
265    * Output only. Input configs via which data currently residing in the table
266    * had been imported.
267    * </pre>
268    *
269    * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
270    */
271   @java.lang.Override
getInputConfigsList()272   public java.util.List<com.google.cloud.automl.v1beta1.InputConfig> getInputConfigsList() {
273     return inputConfigs_;
274   }
275   /**
276    *
277    *
278    * <pre>
279    * Output only. Input configs via which data currently residing in the table
280    * had been imported.
281    * </pre>
282    *
283    * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
284    */
285   @java.lang.Override
286   public java.util.List<? extends com.google.cloud.automl.v1beta1.InputConfigOrBuilder>
getInputConfigsOrBuilderList()287       getInputConfigsOrBuilderList() {
288     return inputConfigs_;
289   }
290   /**
291    *
292    *
293    * <pre>
294    * Output only. Input configs via which data currently residing in the table
295    * had been imported.
296    * </pre>
297    *
298    * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
299    */
300   @java.lang.Override
getInputConfigsCount()301   public int getInputConfigsCount() {
302     return inputConfigs_.size();
303   }
304   /**
305    *
306    *
307    * <pre>
308    * Output only. Input configs via which data currently residing in the table
309    * had been imported.
310    * </pre>
311    *
312    * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
313    */
314   @java.lang.Override
getInputConfigs(int index)315   public com.google.cloud.automl.v1beta1.InputConfig getInputConfigs(int index) {
316     return inputConfigs_.get(index);
317   }
318   /**
319    *
320    *
321    * <pre>
322    * Output only. Input configs via which data currently residing in the table
323    * had been imported.
324    * </pre>
325    *
326    * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
327    */
328   @java.lang.Override
getInputConfigsOrBuilder(int index)329   public com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigsOrBuilder(int index) {
330     return inputConfigs_.get(index);
331   }
332 
333   public static final int ETAG_FIELD_NUMBER = 6;
334 
335   @SuppressWarnings("serial")
336   private volatile java.lang.Object etag_ = "";
337   /**
338    *
339    *
340    * <pre>
341    * Used to perform consistent read-modify-write updates. If not set, a blind
342    * "overwrite" update happens.
343    * </pre>
344    *
345    * <code>string etag = 6;</code>
346    *
347    * @return The etag.
348    */
349   @java.lang.Override
getEtag()350   public java.lang.String getEtag() {
351     java.lang.Object ref = etag_;
352     if (ref instanceof java.lang.String) {
353       return (java.lang.String) ref;
354     } else {
355       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
356       java.lang.String s = bs.toStringUtf8();
357       etag_ = s;
358       return s;
359     }
360   }
361   /**
362    *
363    *
364    * <pre>
365    * Used to perform consistent read-modify-write updates. If not set, a blind
366    * "overwrite" update happens.
367    * </pre>
368    *
369    * <code>string etag = 6;</code>
370    *
371    * @return The bytes for etag.
372    */
373   @java.lang.Override
getEtagBytes()374   public com.google.protobuf.ByteString getEtagBytes() {
375     java.lang.Object ref = etag_;
376     if (ref instanceof java.lang.String) {
377       com.google.protobuf.ByteString b =
378           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
379       etag_ = b;
380       return b;
381     } else {
382       return (com.google.protobuf.ByteString) ref;
383     }
384   }
385 
386   private byte memoizedIsInitialized = -1;
387 
388   @java.lang.Override
isInitialized()389   public final boolean isInitialized() {
390     byte isInitialized = memoizedIsInitialized;
391     if (isInitialized == 1) return true;
392     if (isInitialized == 0) return false;
393 
394     memoizedIsInitialized = 1;
395     return true;
396   }
397 
398   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)399   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
400     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
401       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
402     }
403     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeColumnSpecId_)) {
404       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, timeColumnSpecId_);
405     }
406     if (rowCount_ != 0L) {
407       output.writeInt64(3, rowCount_);
408     }
409     if (validRowCount_ != 0L) {
410       output.writeInt64(4, validRowCount_);
411     }
412     for (int i = 0; i < inputConfigs_.size(); i++) {
413       output.writeMessage(5, inputConfigs_.get(i));
414     }
415     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
416       com.google.protobuf.GeneratedMessageV3.writeString(output, 6, etag_);
417     }
418     if (columnCount_ != 0L) {
419       output.writeInt64(7, columnCount_);
420     }
421     getUnknownFields().writeTo(output);
422   }
423 
424   @java.lang.Override
getSerializedSize()425   public int getSerializedSize() {
426     int size = memoizedSize;
427     if (size != -1) return size;
428 
429     size = 0;
430     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
431       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
432     }
433     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeColumnSpecId_)) {
434       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, timeColumnSpecId_);
435     }
436     if (rowCount_ != 0L) {
437       size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, rowCount_);
438     }
439     if (validRowCount_ != 0L) {
440       size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, validRowCount_);
441     }
442     for (int i = 0; i < inputConfigs_.size(); i++) {
443       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, inputConfigs_.get(i));
444     }
445     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
446       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, etag_);
447     }
448     if (columnCount_ != 0L) {
449       size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, columnCount_);
450     }
451     size += getUnknownFields().getSerializedSize();
452     memoizedSize = size;
453     return size;
454   }
455 
456   @java.lang.Override
equals(final java.lang.Object obj)457   public boolean equals(final java.lang.Object obj) {
458     if (obj == this) {
459       return true;
460     }
461     if (!(obj instanceof com.google.cloud.automl.v1beta1.TableSpec)) {
462       return super.equals(obj);
463     }
464     com.google.cloud.automl.v1beta1.TableSpec other =
465         (com.google.cloud.automl.v1beta1.TableSpec) obj;
466 
467     if (!getName().equals(other.getName())) return false;
468     if (!getTimeColumnSpecId().equals(other.getTimeColumnSpecId())) return false;
469     if (getRowCount() != other.getRowCount()) return false;
470     if (getValidRowCount() != other.getValidRowCount()) return false;
471     if (getColumnCount() != other.getColumnCount()) return false;
472     if (!getInputConfigsList().equals(other.getInputConfigsList())) return false;
473     if (!getEtag().equals(other.getEtag())) return false;
474     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
475     return true;
476   }
477 
478   @java.lang.Override
hashCode()479   public int hashCode() {
480     if (memoizedHashCode != 0) {
481       return memoizedHashCode;
482     }
483     int hash = 41;
484     hash = (19 * hash) + getDescriptor().hashCode();
485     hash = (37 * hash) + NAME_FIELD_NUMBER;
486     hash = (53 * hash) + getName().hashCode();
487     hash = (37 * hash) + TIME_COLUMN_SPEC_ID_FIELD_NUMBER;
488     hash = (53 * hash) + getTimeColumnSpecId().hashCode();
489     hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER;
490     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowCount());
491     hash = (37 * hash) + VALID_ROW_COUNT_FIELD_NUMBER;
492     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getValidRowCount());
493     hash = (37 * hash) + COLUMN_COUNT_FIELD_NUMBER;
494     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getColumnCount());
495     if (getInputConfigsCount() > 0) {
496       hash = (37 * hash) + INPUT_CONFIGS_FIELD_NUMBER;
497       hash = (53 * hash) + getInputConfigsList().hashCode();
498     }
499     hash = (37 * hash) + ETAG_FIELD_NUMBER;
500     hash = (53 * hash) + getEtag().hashCode();
501     hash = (29 * hash) + getUnknownFields().hashCode();
502     memoizedHashCode = hash;
503     return hash;
504   }
505 
parseFrom(java.nio.ByteBuffer data)506   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(java.nio.ByteBuffer data)
507       throws com.google.protobuf.InvalidProtocolBufferException {
508     return PARSER.parseFrom(data);
509   }
510 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)511   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(
512       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
513       throws com.google.protobuf.InvalidProtocolBufferException {
514     return PARSER.parseFrom(data, extensionRegistry);
515   }
516 
parseFrom( com.google.protobuf.ByteString data)517   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(
518       com.google.protobuf.ByteString data)
519       throws com.google.protobuf.InvalidProtocolBufferException {
520     return PARSER.parseFrom(data);
521   }
522 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)523   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(
524       com.google.protobuf.ByteString data,
525       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
526       throws com.google.protobuf.InvalidProtocolBufferException {
527     return PARSER.parseFrom(data, extensionRegistry);
528   }
529 
parseFrom(byte[] data)530   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(byte[] data)
531       throws com.google.protobuf.InvalidProtocolBufferException {
532     return PARSER.parseFrom(data);
533   }
534 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)535   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(
536       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
537       throws com.google.protobuf.InvalidProtocolBufferException {
538     return PARSER.parseFrom(data, extensionRegistry);
539   }
540 
parseFrom(java.io.InputStream input)541   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(java.io.InputStream input)
542       throws java.io.IOException {
543     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
544   }
545 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)546   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(
547       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
548       throws java.io.IOException {
549     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
550         PARSER, input, extensionRegistry);
551   }
552 
parseDelimitedFrom( java.io.InputStream input)553   public static com.google.cloud.automl.v1beta1.TableSpec parseDelimitedFrom(
554       java.io.InputStream input) throws java.io.IOException {
555     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
556   }
557 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)558   public static com.google.cloud.automl.v1beta1.TableSpec parseDelimitedFrom(
559       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
560       throws java.io.IOException {
561     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
562         PARSER, input, extensionRegistry);
563   }
564 
parseFrom( com.google.protobuf.CodedInputStream input)565   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(
566       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
567     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
568   }
569 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)570   public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(
571       com.google.protobuf.CodedInputStream input,
572       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
573       throws java.io.IOException {
574     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
575         PARSER, input, extensionRegistry);
576   }
577 
578   @java.lang.Override
newBuilderForType()579   public Builder newBuilderForType() {
580     return newBuilder();
581   }
582 
newBuilder()583   public static Builder newBuilder() {
584     return DEFAULT_INSTANCE.toBuilder();
585   }
586 
newBuilder(com.google.cloud.automl.v1beta1.TableSpec prototype)587   public static Builder newBuilder(com.google.cloud.automl.v1beta1.TableSpec prototype) {
588     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
589   }
590 
591   @java.lang.Override
toBuilder()592   public Builder toBuilder() {
593     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
594   }
595 
596   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)597   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
598     Builder builder = new Builder(parent);
599     return builder;
600   }
601   /**
602    *
603    *
604    * <pre>
605    * A specification of a relational table.
606    * The table's schema is represented via its child column specs. It is
607    * pre-populated as part of ImportData by schema inference algorithm, the
608    * version of which is a required parameter of ImportData InputConfig.
609    * Note: While working with a table, at times the schema may be
610    * inconsistent with the data in the table (e.g. string in a FLOAT64 column).
611    * The consistency validation is done upon creation of a model.
612    * Used by:
613    *   *   Tables
614    * </pre>
615    *
616    * Protobuf type {@code google.cloud.automl.v1beta1.TableSpec}
617    */
618   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
619       implements
620       // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TableSpec)
621       com.google.cloud.automl.v1beta1.TableSpecOrBuilder {
getDescriptor()622     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
623       return com.google.cloud.automl.v1beta1.TableSpecOuterClass
624           .internal_static_google_cloud_automl_v1beta1_TableSpec_descriptor;
625     }
626 
627     @java.lang.Override
628     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()629         internalGetFieldAccessorTable() {
630       return com.google.cloud.automl.v1beta1.TableSpecOuterClass
631           .internal_static_google_cloud_automl_v1beta1_TableSpec_fieldAccessorTable
632           .ensureFieldAccessorsInitialized(
633               com.google.cloud.automl.v1beta1.TableSpec.class,
634               com.google.cloud.automl.v1beta1.TableSpec.Builder.class);
635     }
636 
637     // Construct using com.google.cloud.automl.v1beta1.TableSpec.newBuilder()
Builder()638     private Builder() {}
639 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)640     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
641       super(parent);
642     }
643 
644     @java.lang.Override
clear()645     public Builder clear() {
646       super.clear();
647       bitField0_ = 0;
648       name_ = "";
649       timeColumnSpecId_ = "";
650       rowCount_ = 0L;
651       validRowCount_ = 0L;
652       columnCount_ = 0L;
653       if (inputConfigsBuilder_ == null) {
654         inputConfigs_ = java.util.Collections.emptyList();
655       } else {
656         inputConfigs_ = null;
657         inputConfigsBuilder_.clear();
658       }
659       bitField0_ = (bitField0_ & ~0x00000020);
660       etag_ = "";
661       return this;
662     }
663 
664     @java.lang.Override
getDescriptorForType()665     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
666       return com.google.cloud.automl.v1beta1.TableSpecOuterClass
667           .internal_static_google_cloud_automl_v1beta1_TableSpec_descriptor;
668     }
669 
670     @java.lang.Override
getDefaultInstanceForType()671     public com.google.cloud.automl.v1beta1.TableSpec getDefaultInstanceForType() {
672       return com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance();
673     }
674 
675     @java.lang.Override
build()676     public com.google.cloud.automl.v1beta1.TableSpec build() {
677       com.google.cloud.automl.v1beta1.TableSpec result = buildPartial();
678       if (!result.isInitialized()) {
679         throw newUninitializedMessageException(result);
680       }
681       return result;
682     }
683 
684     @java.lang.Override
buildPartial()685     public com.google.cloud.automl.v1beta1.TableSpec buildPartial() {
686       com.google.cloud.automl.v1beta1.TableSpec result =
687           new com.google.cloud.automl.v1beta1.TableSpec(this);
688       buildPartialRepeatedFields(result);
689       if (bitField0_ != 0) {
690         buildPartial0(result);
691       }
692       onBuilt();
693       return result;
694     }
695 
buildPartialRepeatedFields(com.google.cloud.automl.v1beta1.TableSpec result)696     private void buildPartialRepeatedFields(com.google.cloud.automl.v1beta1.TableSpec result) {
697       if (inputConfigsBuilder_ == null) {
698         if (((bitField0_ & 0x00000020) != 0)) {
699           inputConfigs_ = java.util.Collections.unmodifiableList(inputConfigs_);
700           bitField0_ = (bitField0_ & ~0x00000020);
701         }
702         result.inputConfigs_ = inputConfigs_;
703       } else {
704         result.inputConfigs_ = inputConfigsBuilder_.build();
705       }
706     }
707 
buildPartial0(com.google.cloud.automl.v1beta1.TableSpec result)708     private void buildPartial0(com.google.cloud.automl.v1beta1.TableSpec result) {
709       int from_bitField0_ = bitField0_;
710       if (((from_bitField0_ & 0x00000001) != 0)) {
711         result.name_ = name_;
712       }
713       if (((from_bitField0_ & 0x00000002) != 0)) {
714         result.timeColumnSpecId_ = timeColumnSpecId_;
715       }
716       if (((from_bitField0_ & 0x00000004) != 0)) {
717         result.rowCount_ = rowCount_;
718       }
719       if (((from_bitField0_ & 0x00000008) != 0)) {
720         result.validRowCount_ = validRowCount_;
721       }
722       if (((from_bitField0_ & 0x00000010) != 0)) {
723         result.columnCount_ = columnCount_;
724       }
725       if (((from_bitField0_ & 0x00000040) != 0)) {
726         result.etag_ = etag_;
727       }
728     }
729 
730     @java.lang.Override
clone()731     public Builder clone() {
732       return super.clone();
733     }
734 
735     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)736     public Builder setField(
737         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
738       return super.setField(field, value);
739     }
740 
741     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)742     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
743       return super.clearField(field);
744     }
745 
746     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)747     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
748       return super.clearOneof(oneof);
749     }
750 
751     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)752     public Builder setRepeatedField(
753         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
754       return super.setRepeatedField(field, index, value);
755     }
756 
757     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)758     public Builder addRepeatedField(
759         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
760       return super.addRepeatedField(field, value);
761     }
762 
763     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)764     public Builder mergeFrom(com.google.protobuf.Message other) {
765       if (other instanceof com.google.cloud.automl.v1beta1.TableSpec) {
766         return mergeFrom((com.google.cloud.automl.v1beta1.TableSpec) other);
767       } else {
768         super.mergeFrom(other);
769         return this;
770       }
771     }
772 
mergeFrom(com.google.cloud.automl.v1beta1.TableSpec other)773     public Builder mergeFrom(com.google.cloud.automl.v1beta1.TableSpec other) {
774       if (other == com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance()) return this;
775       if (!other.getName().isEmpty()) {
776         name_ = other.name_;
777         bitField0_ |= 0x00000001;
778         onChanged();
779       }
780       if (!other.getTimeColumnSpecId().isEmpty()) {
781         timeColumnSpecId_ = other.timeColumnSpecId_;
782         bitField0_ |= 0x00000002;
783         onChanged();
784       }
785       if (other.getRowCount() != 0L) {
786         setRowCount(other.getRowCount());
787       }
788       if (other.getValidRowCount() != 0L) {
789         setValidRowCount(other.getValidRowCount());
790       }
791       if (other.getColumnCount() != 0L) {
792         setColumnCount(other.getColumnCount());
793       }
794       if (inputConfigsBuilder_ == null) {
795         if (!other.inputConfigs_.isEmpty()) {
796           if (inputConfigs_.isEmpty()) {
797             inputConfigs_ = other.inputConfigs_;
798             bitField0_ = (bitField0_ & ~0x00000020);
799           } else {
800             ensureInputConfigsIsMutable();
801             inputConfigs_.addAll(other.inputConfigs_);
802           }
803           onChanged();
804         }
805       } else {
806         if (!other.inputConfigs_.isEmpty()) {
807           if (inputConfigsBuilder_.isEmpty()) {
808             inputConfigsBuilder_.dispose();
809             inputConfigsBuilder_ = null;
810             inputConfigs_ = other.inputConfigs_;
811             bitField0_ = (bitField0_ & ~0x00000020);
812             inputConfigsBuilder_ =
813                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
814                     ? getInputConfigsFieldBuilder()
815                     : null;
816           } else {
817             inputConfigsBuilder_.addAllMessages(other.inputConfigs_);
818           }
819         }
820       }
821       if (!other.getEtag().isEmpty()) {
822         etag_ = other.etag_;
823         bitField0_ |= 0x00000040;
824         onChanged();
825       }
826       this.mergeUnknownFields(other.getUnknownFields());
827       onChanged();
828       return this;
829     }
830 
831     @java.lang.Override
isInitialized()832     public final boolean isInitialized() {
833       return true;
834     }
835 
836     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)837     public Builder mergeFrom(
838         com.google.protobuf.CodedInputStream input,
839         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
840         throws java.io.IOException {
841       if (extensionRegistry == null) {
842         throw new java.lang.NullPointerException();
843       }
844       try {
845         boolean done = false;
846         while (!done) {
847           int tag = input.readTag();
848           switch (tag) {
849             case 0:
850               done = true;
851               break;
852             case 10:
853               {
854                 name_ = input.readStringRequireUtf8();
855                 bitField0_ |= 0x00000001;
856                 break;
857               } // case 10
858             case 18:
859               {
860                 timeColumnSpecId_ = input.readStringRequireUtf8();
861                 bitField0_ |= 0x00000002;
862                 break;
863               } // case 18
864             case 24:
865               {
866                 rowCount_ = input.readInt64();
867                 bitField0_ |= 0x00000004;
868                 break;
869               } // case 24
870             case 32:
871               {
872                 validRowCount_ = input.readInt64();
873                 bitField0_ |= 0x00000008;
874                 break;
875               } // case 32
876             case 42:
877               {
878                 com.google.cloud.automl.v1beta1.InputConfig m =
879                     input.readMessage(
880                         com.google.cloud.automl.v1beta1.InputConfig.parser(), extensionRegistry);
881                 if (inputConfigsBuilder_ == null) {
882                   ensureInputConfigsIsMutable();
883                   inputConfigs_.add(m);
884                 } else {
885                   inputConfigsBuilder_.addMessage(m);
886                 }
887                 break;
888               } // case 42
889             case 50:
890               {
891                 etag_ = input.readStringRequireUtf8();
892                 bitField0_ |= 0x00000040;
893                 break;
894               } // case 50
895             case 56:
896               {
897                 columnCount_ = input.readInt64();
898                 bitField0_ |= 0x00000010;
899                 break;
900               } // case 56
901             default:
902               {
903                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
904                   done = true; // was an endgroup tag
905                 }
906                 break;
907               } // default:
908           } // switch (tag)
909         } // while (!done)
910       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
911         throw e.unwrapIOException();
912       } finally {
913         onChanged();
914       } // finally
915       return this;
916     }
917 
918     private int bitField0_;
919 
920     private java.lang.Object name_ = "";
921     /**
922      *
923      *
924      * <pre>
925      * Output only. The resource name of the table spec.
926      * Form:
927      * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
928      * </pre>
929      *
930      * <code>string name = 1;</code>
931      *
932      * @return The name.
933      */
getName()934     public java.lang.String getName() {
935       java.lang.Object ref = name_;
936       if (!(ref instanceof java.lang.String)) {
937         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
938         java.lang.String s = bs.toStringUtf8();
939         name_ = s;
940         return s;
941       } else {
942         return (java.lang.String) ref;
943       }
944     }
945     /**
946      *
947      *
948      * <pre>
949      * Output only. The resource name of the table spec.
950      * Form:
951      * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
952      * </pre>
953      *
954      * <code>string name = 1;</code>
955      *
956      * @return The bytes for name.
957      */
getNameBytes()958     public com.google.protobuf.ByteString getNameBytes() {
959       java.lang.Object ref = name_;
960       if (ref instanceof String) {
961         com.google.protobuf.ByteString b =
962             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
963         name_ = b;
964         return b;
965       } else {
966         return (com.google.protobuf.ByteString) ref;
967       }
968     }
969     /**
970      *
971      *
972      * <pre>
973      * Output only. The resource name of the table spec.
974      * Form:
975      * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
976      * </pre>
977      *
978      * <code>string name = 1;</code>
979      *
980      * @param value The name to set.
981      * @return This builder for chaining.
982      */
setName(java.lang.String value)983     public Builder setName(java.lang.String value) {
984       if (value == null) {
985         throw new NullPointerException();
986       }
987       name_ = value;
988       bitField0_ |= 0x00000001;
989       onChanged();
990       return this;
991     }
992     /**
993      *
994      *
995      * <pre>
996      * Output only. The resource name of the table spec.
997      * Form:
998      * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
999      * </pre>
1000      *
1001      * <code>string name = 1;</code>
1002      *
1003      * @return This builder for chaining.
1004      */
clearName()1005     public Builder clearName() {
1006       name_ = getDefaultInstance().getName();
1007       bitField0_ = (bitField0_ & ~0x00000001);
1008       onChanged();
1009       return this;
1010     }
1011     /**
1012      *
1013      *
1014      * <pre>
1015      * Output only. The resource name of the table spec.
1016      * Form:
1017      * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
1018      * </pre>
1019      *
1020      * <code>string name = 1;</code>
1021      *
1022      * @param value The bytes for name to set.
1023      * @return This builder for chaining.
1024      */
setNameBytes(com.google.protobuf.ByteString value)1025     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1026       if (value == null) {
1027         throw new NullPointerException();
1028       }
1029       checkByteStringIsUtf8(value);
1030       name_ = value;
1031       bitField0_ |= 0x00000001;
1032       onChanged();
1033       return this;
1034     }
1035 
1036     private java.lang.Object timeColumnSpecId_ = "";
1037     /**
1038      *
1039      *
1040      * <pre>
1041      * column_spec_id of the time column. Only used if the parent dataset's
1042      * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
1043      * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
1044      * those in between to VALIDATE.
1045      * Required type: TIMESTAMP.
1046      * If both this column and ml_use_column are not set, then ML use of all rows
1047      * will be assigned by AutoML. NOTE: Updates of this field will instantly
1048      * affect any other users concurrently working with the dataset.
1049      * </pre>
1050      *
1051      * <code>string time_column_spec_id = 2;</code>
1052      *
1053      * @return The timeColumnSpecId.
1054      */
getTimeColumnSpecId()1055     public java.lang.String getTimeColumnSpecId() {
1056       java.lang.Object ref = timeColumnSpecId_;
1057       if (!(ref instanceof java.lang.String)) {
1058         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1059         java.lang.String s = bs.toStringUtf8();
1060         timeColumnSpecId_ = s;
1061         return s;
1062       } else {
1063         return (java.lang.String) ref;
1064       }
1065     }
1066     /**
1067      *
1068      *
1069      * <pre>
1070      * column_spec_id of the time column. Only used if the parent dataset's
1071      * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
1072      * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
1073      * those in between to VALIDATE.
1074      * Required type: TIMESTAMP.
1075      * If both this column and ml_use_column are not set, then ML use of all rows
1076      * will be assigned by AutoML. NOTE: Updates of this field will instantly
1077      * affect any other users concurrently working with the dataset.
1078      * </pre>
1079      *
1080      * <code>string time_column_spec_id = 2;</code>
1081      *
1082      * @return The bytes for timeColumnSpecId.
1083      */
getTimeColumnSpecIdBytes()1084     public com.google.protobuf.ByteString getTimeColumnSpecIdBytes() {
1085       java.lang.Object ref = timeColumnSpecId_;
1086       if (ref instanceof String) {
1087         com.google.protobuf.ByteString b =
1088             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1089         timeColumnSpecId_ = b;
1090         return b;
1091       } else {
1092         return (com.google.protobuf.ByteString) ref;
1093       }
1094     }
1095     /**
1096      *
1097      *
1098      * <pre>
1099      * column_spec_id of the time column. Only used if the parent dataset's
1100      * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
1101      * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
1102      * those in between to VALIDATE.
1103      * Required type: TIMESTAMP.
1104      * If both this column and ml_use_column are not set, then ML use of all rows
1105      * will be assigned by AutoML. NOTE: Updates of this field will instantly
1106      * affect any other users concurrently working with the dataset.
1107      * </pre>
1108      *
1109      * <code>string time_column_spec_id = 2;</code>
1110      *
1111      * @param value The timeColumnSpecId to set.
1112      * @return This builder for chaining.
1113      */
setTimeColumnSpecId(java.lang.String value)1114     public Builder setTimeColumnSpecId(java.lang.String value) {
1115       if (value == null) {
1116         throw new NullPointerException();
1117       }
1118       timeColumnSpecId_ = value;
1119       bitField0_ |= 0x00000002;
1120       onChanged();
1121       return this;
1122     }
1123     /**
1124      *
1125      *
1126      * <pre>
1127      * column_spec_id of the time column. Only used if the parent dataset's
1128      * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
1129      * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
1130      * those in between to VALIDATE.
1131      * Required type: TIMESTAMP.
1132      * If both this column and ml_use_column are not set, then ML use of all rows
1133      * will be assigned by AutoML. NOTE: Updates of this field will instantly
1134      * affect any other users concurrently working with the dataset.
1135      * </pre>
1136      *
1137      * <code>string time_column_spec_id = 2;</code>
1138      *
1139      * @return This builder for chaining.
1140      */
clearTimeColumnSpecId()1141     public Builder clearTimeColumnSpecId() {
1142       timeColumnSpecId_ = getDefaultInstance().getTimeColumnSpecId();
1143       bitField0_ = (bitField0_ & ~0x00000002);
1144       onChanged();
1145       return this;
1146     }
1147     /**
1148      *
1149      *
1150      * <pre>
1151      * column_spec_id of the time column. Only used if the parent dataset's
1152      * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
1153      * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
1154      * those in between to VALIDATE.
1155      * Required type: TIMESTAMP.
1156      * If both this column and ml_use_column are not set, then ML use of all rows
1157      * will be assigned by AutoML. NOTE: Updates of this field will instantly
1158      * affect any other users concurrently working with the dataset.
1159      * </pre>
1160      *
1161      * <code>string time_column_spec_id = 2;</code>
1162      *
1163      * @param value The bytes for timeColumnSpecId to set.
1164      * @return This builder for chaining.
1165      */
setTimeColumnSpecIdBytes(com.google.protobuf.ByteString value)1166     public Builder setTimeColumnSpecIdBytes(com.google.protobuf.ByteString value) {
1167       if (value == null) {
1168         throw new NullPointerException();
1169       }
1170       checkByteStringIsUtf8(value);
1171       timeColumnSpecId_ = value;
1172       bitField0_ |= 0x00000002;
1173       onChanged();
1174       return this;
1175     }
1176 
1177     private long rowCount_;
1178     /**
1179      *
1180      *
1181      * <pre>
1182      * Output only. The number of rows (i.e. examples) in the table.
1183      * </pre>
1184      *
1185      * <code>int64 row_count = 3;</code>
1186      *
1187      * @return The rowCount.
1188      */
1189     @java.lang.Override
getRowCount()1190     public long getRowCount() {
1191       return rowCount_;
1192     }
1193     /**
1194      *
1195      *
1196      * <pre>
1197      * Output only. The number of rows (i.e. examples) in the table.
1198      * </pre>
1199      *
1200      * <code>int64 row_count = 3;</code>
1201      *
1202      * @param value The rowCount to set.
1203      * @return This builder for chaining.
1204      */
setRowCount(long value)1205     public Builder setRowCount(long value) {
1206 
1207       rowCount_ = value;
1208       bitField0_ |= 0x00000004;
1209       onChanged();
1210       return this;
1211     }
1212     /**
1213      *
1214      *
1215      * <pre>
1216      * Output only. The number of rows (i.e. examples) in the table.
1217      * </pre>
1218      *
1219      * <code>int64 row_count = 3;</code>
1220      *
1221      * @return This builder for chaining.
1222      */
clearRowCount()1223     public Builder clearRowCount() {
1224       bitField0_ = (bitField0_ & ~0x00000004);
1225       rowCount_ = 0L;
1226       onChanged();
1227       return this;
1228     }
1229 
1230     private long validRowCount_;
1231     /**
1232      *
1233      *
1234      * <pre>
1235      * Output only. The number of valid rows (i.e. without values that don't match
1236      * DataType-s of their columns).
1237      * </pre>
1238      *
1239      * <code>int64 valid_row_count = 4;</code>
1240      *
1241      * @return The validRowCount.
1242      */
1243     @java.lang.Override
getValidRowCount()1244     public long getValidRowCount() {
1245       return validRowCount_;
1246     }
1247     /**
1248      *
1249      *
1250      * <pre>
1251      * Output only. The number of valid rows (i.e. without values that don't match
1252      * DataType-s of their columns).
1253      * </pre>
1254      *
1255      * <code>int64 valid_row_count = 4;</code>
1256      *
1257      * @param value The validRowCount to set.
1258      * @return This builder for chaining.
1259      */
setValidRowCount(long value)1260     public Builder setValidRowCount(long value) {
1261 
1262       validRowCount_ = value;
1263       bitField0_ |= 0x00000008;
1264       onChanged();
1265       return this;
1266     }
1267     /**
1268      *
1269      *
1270      * <pre>
1271      * Output only. The number of valid rows (i.e. without values that don't match
1272      * DataType-s of their columns).
1273      * </pre>
1274      *
1275      * <code>int64 valid_row_count = 4;</code>
1276      *
1277      * @return This builder for chaining.
1278      */
clearValidRowCount()1279     public Builder clearValidRowCount() {
1280       bitField0_ = (bitField0_ & ~0x00000008);
1281       validRowCount_ = 0L;
1282       onChanged();
1283       return this;
1284     }
1285 
1286     private long columnCount_;
1287     /**
1288      *
1289      *
1290      * <pre>
1291      * Output only. The number of columns of the table. That is, the number of
1292      * child ColumnSpec-s.
1293      * </pre>
1294      *
1295      * <code>int64 column_count = 7;</code>
1296      *
1297      * @return The columnCount.
1298      */
1299     @java.lang.Override
getColumnCount()1300     public long getColumnCount() {
1301       return columnCount_;
1302     }
1303     /**
1304      *
1305      *
1306      * <pre>
1307      * Output only. The number of columns of the table. That is, the number of
1308      * child ColumnSpec-s.
1309      * </pre>
1310      *
1311      * <code>int64 column_count = 7;</code>
1312      *
1313      * @param value The columnCount to set.
1314      * @return This builder for chaining.
1315      */
setColumnCount(long value)1316     public Builder setColumnCount(long value) {
1317 
1318       columnCount_ = value;
1319       bitField0_ |= 0x00000010;
1320       onChanged();
1321       return this;
1322     }
1323     /**
1324      *
1325      *
1326      * <pre>
1327      * Output only. The number of columns of the table. That is, the number of
1328      * child ColumnSpec-s.
1329      * </pre>
1330      *
1331      * <code>int64 column_count = 7;</code>
1332      *
1333      * @return This builder for chaining.
1334      */
clearColumnCount()1335     public Builder clearColumnCount() {
1336       bitField0_ = (bitField0_ & ~0x00000010);
1337       columnCount_ = 0L;
1338       onChanged();
1339       return this;
1340     }
1341 
1342     private java.util.List<com.google.cloud.automl.v1beta1.InputConfig> inputConfigs_ =
1343         java.util.Collections.emptyList();
1344 
ensureInputConfigsIsMutable()1345     private void ensureInputConfigsIsMutable() {
1346       if (!((bitField0_ & 0x00000020) != 0)) {
1347         inputConfigs_ =
1348             new java.util.ArrayList<com.google.cloud.automl.v1beta1.InputConfig>(inputConfigs_);
1349         bitField0_ |= 0x00000020;
1350       }
1351     }
1352 
1353     private com.google.protobuf.RepeatedFieldBuilderV3<
1354             com.google.cloud.automl.v1beta1.InputConfig,
1355             com.google.cloud.automl.v1beta1.InputConfig.Builder,
1356             com.google.cloud.automl.v1beta1.InputConfigOrBuilder>
1357         inputConfigsBuilder_;
1358 
1359     /**
1360      *
1361      *
1362      * <pre>
1363      * Output only. Input configs via which data currently residing in the table
1364      * had been imported.
1365      * </pre>
1366      *
1367      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1368      */
getInputConfigsList()1369     public java.util.List<com.google.cloud.automl.v1beta1.InputConfig> getInputConfigsList() {
1370       if (inputConfigsBuilder_ == null) {
1371         return java.util.Collections.unmodifiableList(inputConfigs_);
1372       } else {
1373         return inputConfigsBuilder_.getMessageList();
1374       }
1375     }
1376     /**
1377      *
1378      *
1379      * <pre>
1380      * Output only. Input configs via which data currently residing in the table
1381      * had been imported.
1382      * </pre>
1383      *
1384      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1385      */
getInputConfigsCount()1386     public int getInputConfigsCount() {
1387       if (inputConfigsBuilder_ == null) {
1388         return inputConfigs_.size();
1389       } else {
1390         return inputConfigsBuilder_.getCount();
1391       }
1392     }
1393     /**
1394      *
1395      *
1396      * <pre>
1397      * Output only. Input configs via which data currently residing in the table
1398      * had been imported.
1399      * </pre>
1400      *
1401      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1402      */
getInputConfigs(int index)1403     public com.google.cloud.automl.v1beta1.InputConfig getInputConfigs(int index) {
1404       if (inputConfigsBuilder_ == null) {
1405         return inputConfigs_.get(index);
1406       } else {
1407         return inputConfigsBuilder_.getMessage(index);
1408       }
1409     }
1410     /**
1411      *
1412      *
1413      * <pre>
1414      * Output only. Input configs via which data currently residing in the table
1415      * had been imported.
1416      * </pre>
1417      *
1418      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1419      */
setInputConfigs(int index, com.google.cloud.automl.v1beta1.InputConfig value)1420     public Builder setInputConfigs(int index, com.google.cloud.automl.v1beta1.InputConfig value) {
1421       if (inputConfigsBuilder_ == null) {
1422         if (value == null) {
1423           throw new NullPointerException();
1424         }
1425         ensureInputConfigsIsMutable();
1426         inputConfigs_.set(index, value);
1427         onChanged();
1428       } else {
1429         inputConfigsBuilder_.setMessage(index, value);
1430       }
1431       return this;
1432     }
1433     /**
1434      *
1435      *
1436      * <pre>
1437      * Output only. Input configs via which data currently residing in the table
1438      * had been imported.
1439      * </pre>
1440      *
1441      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1442      */
setInputConfigs( int index, com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue)1443     public Builder setInputConfigs(
1444         int index, com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue) {
1445       if (inputConfigsBuilder_ == null) {
1446         ensureInputConfigsIsMutable();
1447         inputConfigs_.set(index, builderForValue.build());
1448         onChanged();
1449       } else {
1450         inputConfigsBuilder_.setMessage(index, builderForValue.build());
1451       }
1452       return this;
1453     }
1454     /**
1455      *
1456      *
1457      * <pre>
1458      * Output only. Input configs via which data currently residing in the table
1459      * had been imported.
1460      * </pre>
1461      *
1462      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1463      */
addInputConfigs(com.google.cloud.automl.v1beta1.InputConfig value)1464     public Builder addInputConfigs(com.google.cloud.automl.v1beta1.InputConfig value) {
1465       if (inputConfigsBuilder_ == null) {
1466         if (value == null) {
1467           throw new NullPointerException();
1468         }
1469         ensureInputConfigsIsMutable();
1470         inputConfigs_.add(value);
1471         onChanged();
1472       } else {
1473         inputConfigsBuilder_.addMessage(value);
1474       }
1475       return this;
1476     }
1477     /**
1478      *
1479      *
1480      * <pre>
1481      * Output only. Input configs via which data currently residing in the table
1482      * had been imported.
1483      * </pre>
1484      *
1485      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1486      */
addInputConfigs(int index, com.google.cloud.automl.v1beta1.InputConfig value)1487     public Builder addInputConfigs(int index, com.google.cloud.automl.v1beta1.InputConfig value) {
1488       if (inputConfigsBuilder_ == null) {
1489         if (value == null) {
1490           throw new NullPointerException();
1491         }
1492         ensureInputConfigsIsMutable();
1493         inputConfigs_.add(index, value);
1494         onChanged();
1495       } else {
1496         inputConfigsBuilder_.addMessage(index, value);
1497       }
1498       return this;
1499     }
1500     /**
1501      *
1502      *
1503      * <pre>
1504      * Output only. Input configs via which data currently residing in the table
1505      * had been imported.
1506      * </pre>
1507      *
1508      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1509      */
addInputConfigs( com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue)1510     public Builder addInputConfigs(
1511         com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue) {
1512       if (inputConfigsBuilder_ == null) {
1513         ensureInputConfigsIsMutable();
1514         inputConfigs_.add(builderForValue.build());
1515         onChanged();
1516       } else {
1517         inputConfigsBuilder_.addMessage(builderForValue.build());
1518       }
1519       return this;
1520     }
1521     /**
1522      *
1523      *
1524      * <pre>
1525      * Output only. Input configs via which data currently residing in the table
1526      * had been imported.
1527      * </pre>
1528      *
1529      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1530      */
addInputConfigs( int index, com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue)1531     public Builder addInputConfigs(
1532         int index, com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue) {
1533       if (inputConfigsBuilder_ == null) {
1534         ensureInputConfigsIsMutable();
1535         inputConfigs_.add(index, builderForValue.build());
1536         onChanged();
1537       } else {
1538         inputConfigsBuilder_.addMessage(index, builderForValue.build());
1539       }
1540       return this;
1541     }
1542     /**
1543      *
1544      *
1545      * <pre>
1546      * Output only. Input configs via which data currently residing in the table
1547      * had been imported.
1548      * </pre>
1549      *
1550      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1551      */
addAllInputConfigs( java.lang.Iterable<? extends com.google.cloud.automl.v1beta1.InputConfig> values)1552     public Builder addAllInputConfigs(
1553         java.lang.Iterable<? extends com.google.cloud.automl.v1beta1.InputConfig> values) {
1554       if (inputConfigsBuilder_ == null) {
1555         ensureInputConfigsIsMutable();
1556         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputConfigs_);
1557         onChanged();
1558       } else {
1559         inputConfigsBuilder_.addAllMessages(values);
1560       }
1561       return this;
1562     }
1563     /**
1564      *
1565      *
1566      * <pre>
1567      * Output only. Input configs via which data currently residing in the table
1568      * had been imported.
1569      * </pre>
1570      *
1571      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1572      */
clearInputConfigs()1573     public Builder clearInputConfigs() {
1574       if (inputConfigsBuilder_ == null) {
1575         inputConfigs_ = java.util.Collections.emptyList();
1576         bitField0_ = (bitField0_ & ~0x00000020);
1577         onChanged();
1578       } else {
1579         inputConfigsBuilder_.clear();
1580       }
1581       return this;
1582     }
1583     /**
1584      *
1585      *
1586      * <pre>
1587      * Output only. Input configs via which data currently residing in the table
1588      * had been imported.
1589      * </pre>
1590      *
1591      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1592      */
removeInputConfigs(int index)1593     public Builder removeInputConfigs(int index) {
1594       if (inputConfigsBuilder_ == null) {
1595         ensureInputConfigsIsMutable();
1596         inputConfigs_.remove(index);
1597         onChanged();
1598       } else {
1599         inputConfigsBuilder_.remove(index);
1600       }
1601       return this;
1602     }
1603     /**
1604      *
1605      *
1606      * <pre>
1607      * Output only. Input configs via which data currently residing in the table
1608      * had been imported.
1609      * </pre>
1610      *
1611      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1612      */
getInputConfigsBuilder(int index)1613     public com.google.cloud.automl.v1beta1.InputConfig.Builder getInputConfigsBuilder(int index) {
1614       return getInputConfigsFieldBuilder().getBuilder(index);
1615     }
1616     /**
1617      *
1618      *
1619      * <pre>
1620      * Output only. Input configs via which data currently residing in the table
1621      * had been imported.
1622      * </pre>
1623      *
1624      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1625      */
getInputConfigsOrBuilder( int index)1626     public com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigsOrBuilder(
1627         int index) {
1628       if (inputConfigsBuilder_ == null) {
1629         return inputConfigs_.get(index);
1630       } else {
1631         return inputConfigsBuilder_.getMessageOrBuilder(index);
1632       }
1633     }
1634     /**
1635      *
1636      *
1637      * <pre>
1638      * Output only. Input configs via which data currently residing in the table
1639      * had been imported.
1640      * </pre>
1641      *
1642      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1643      */
1644     public java.util.List<? extends com.google.cloud.automl.v1beta1.InputConfigOrBuilder>
getInputConfigsOrBuilderList()1645         getInputConfigsOrBuilderList() {
1646       if (inputConfigsBuilder_ != null) {
1647         return inputConfigsBuilder_.getMessageOrBuilderList();
1648       } else {
1649         return java.util.Collections.unmodifiableList(inputConfigs_);
1650       }
1651     }
1652     /**
1653      *
1654      *
1655      * <pre>
1656      * Output only. Input configs via which data currently residing in the table
1657      * had been imported.
1658      * </pre>
1659      *
1660      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1661      */
addInputConfigsBuilder()1662     public com.google.cloud.automl.v1beta1.InputConfig.Builder addInputConfigsBuilder() {
1663       return getInputConfigsFieldBuilder()
1664           .addBuilder(com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance());
1665     }
1666     /**
1667      *
1668      *
1669      * <pre>
1670      * Output only. Input configs via which data currently residing in the table
1671      * had been imported.
1672      * </pre>
1673      *
1674      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1675      */
addInputConfigsBuilder(int index)1676     public com.google.cloud.automl.v1beta1.InputConfig.Builder addInputConfigsBuilder(int index) {
1677       return getInputConfigsFieldBuilder()
1678           .addBuilder(index, com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance());
1679     }
1680     /**
1681      *
1682      *
1683      * <pre>
1684      * Output only. Input configs via which data currently residing in the table
1685      * had been imported.
1686      * </pre>
1687      *
1688      * <code>repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;</code>
1689      */
1690     public java.util.List<com.google.cloud.automl.v1beta1.InputConfig.Builder>
getInputConfigsBuilderList()1691         getInputConfigsBuilderList() {
1692       return getInputConfigsFieldBuilder().getBuilderList();
1693     }
1694 
1695     private com.google.protobuf.RepeatedFieldBuilderV3<
1696             com.google.cloud.automl.v1beta1.InputConfig,
1697             com.google.cloud.automl.v1beta1.InputConfig.Builder,
1698             com.google.cloud.automl.v1beta1.InputConfigOrBuilder>
getInputConfigsFieldBuilder()1699         getInputConfigsFieldBuilder() {
1700       if (inputConfigsBuilder_ == null) {
1701         inputConfigsBuilder_ =
1702             new com.google.protobuf.RepeatedFieldBuilderV3<
1703                 com.google.cloud.automl.v1beta1.InputConfig,
1704                 com.google.cloud.automl.v1beta1.InputConfig.Builder,
1705                 com.google.cloud.automl.v1beta1.InputConfigOrBuilder>(
1706                 inputConfigs_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean());
1707         inputConfigs_ = null;
1708       }
1709       return inputConfigsBuilder_;
1710     }
1711 
1712     private java.lang.Object etag_ = "";
1713     /**
1714      *
1715      *
1716      * <pre>
1717      * Used to perform consistent read-modify-write updates. If not set, a blind
1718      * "overwrite" update happens.
1719      * </pre>
1720      *
1721      * <code>string etag = 6;</code>
1722      *
1723      * @return The etag.
1724      */
getEtag()1725     public java.lang.String getEtag() {
1726       java.lang.Object ref = etag_;
1727       if (!(ref instanceof java.lang.String)) {
1728         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1729         java.lang.String s = bs.toStringUtf8();
1730         etag_ = s;
1731         return s;
1732       } else {
1733         return (java.lang.String) ref;
1734       }
1735     }
1736     /**
1737      *
1738      *
1739      * <pre>
1740      * Used to perform consistent read-modify-write updates. If not set, a blind
1741      * "overwrite" update happens.
1742      * </pre>
1743      *
1744      * <code>string etag = 6;</code>
1745      *
1746      * @return The bytes for etag.
1747      */
getEtagBytes()1748     public com.google.protobuf.ByteString getEtagBytes() {
1749       java.lang.Object ref = etag_;
1750       if (ref instanceof String) {
1751         com.google.protobuf.ByteString b =
1752             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1753         etag_ = b;
1754         return b;
1755       } else {
1756         return (com.google.protobuf.ByteString) ref;
1757       }
1758     }
1759     /**
1760      *
1761      *
1762      * <pre>
1763      * Used to perform consistent read-modify-write updates. If not set, a blind
1764      * "overwrite" update happens.
1765      * </pre>
1766      *
1767      * <code>string etag = 6;</code>
1768      *
1769      * @param value The etag to set.
1770      * @return This builder for chaining.
1771      */
setEtag(java.lang.String value)1772     public Builder setEtag(java.lang.String value) {
1773       if (value == null) {
1774         throw new NullPointerException();
1775       }
1776       etag_ = value;
1777       bitField0_ |= 0x00000040;
1778       onChanged();
1779       return this;
1780     }
1781     /**
1782      *
1783      *
1784      * <pre>
1785      * Used to perform consistent read-modify-write updates. If not set, a blind
1786      * "overwrite" update happens.
1787      * </pre>
1788      *
1789      * <code>string etag = 6;</code>
1790      *
1791      * @return This builder for chaining.
1792      */
clearEtag()1793     public Builder clearEtag() {
1794       etag_ = getDefaultInstance().getEtag();
1795       bitField0_ = (bitField0_ & ~0x00000040);
1796       onChanged();
1797       return this;
1798     }
1799     /**
1800      *
1801      *
1802      * <pre>
1803      * Used to perform consistent read-modify-write updates. If not set, a blind
1804      * "overwrite" update happens.
1805      * </pre>
1806      *
1807      * <code>string etag = 6;</code>
1808      *
1809      * @param value The bytes for etag to set.
1810      * @return This builder for chaining.
1811      */
setEtagBytes(com.google.protobuf.ByteString value)1812     public Builder setEtagBytes(com.google.protobuf.ByteString value) {
1813       if (value == null) {
1814         throw new NullPointerException();
1815       }
1816       checkByteStringIsUtf8(value);
1817       etag_ = value;
1818       bitField0_ |= 0x00000040;
1819       onChanged();
1820       return this;
1821     }
1822 
1823     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1824     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1825       return super.setUnknownFields(unknownFields);
1826     }
1827 
1828     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1829     public final Builder mergeUnknownFields(
1830         final com.google.protobuf.UnknownFieldSet unknownFields) {
1831       return super.mergeUnknownFields(unknownFields);
1832     }
1833 
1834     // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TableSpec)
1835   }
1836 
1837   // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TableSpec)
1838   private static final com.google.cloud.automl.v1beta1.TableSpec DEFAULT_INSTANCE;
1839 
1840   static {
1841     DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TableSpec();
1842   }
1843 
getDefaultInstance()1844   public static com.google.cloud.automl.v1beta1.TableSpec getDefaultInstance() {
1845     return DEFAULT_INSTANCE;
1846   }
1847 
1848   private static final com.google.protobuf.Parser<TableSpec> PARSER =
1849       new com.google.protobuf.AbstractParser<TableSpec>() {
1850         @java.lang.Override
1851         public TableSpec parsePartialFrom(
1852             com.google.protobuf.CodedInputStream input,
1853             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1854             throws com.google.protobuf.InvalidProtocolBufferException {
1855           Builder builder = newBuilder();
1856           try {
1857             builder.mergeFrom(input, extensionRegistry);
1858           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1859             throw e.setUnfinishedMessage(builder.buildPartial());
1860           } catch (com.google.protobuf.UninitializedMessageException e) {
1861             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1862           } catch (java.io.IOException e) {
1863             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1864                 .setUnfinishedMessage(builder.buildPartial());
1865           }
1866           return builder.buildPartial();
1867         }
1868       };
1869 
parser()1870   public static com.google.protobuf.Parser<TableSpec> parser() {
1871     return PARSER;
1872   }
1873 
1874   @java.lang.Override
getParserForType()1875   public com.google.protobuf.Parser<TableSpec> getParserForType() {
1876     return PARSER;
1877   }
1878 
1879   @java.lang.Override
getDefaultInstanceForType()1880   public com.google.cloud.automl.v1beta1.TableSpec getDefaultInstanceForType() {
1881     return DEFAULT_INSTANCE;
1882   }
1883 }
1884