Class TableSpec.Builder

  • All Implemented Interfaces:
    TableSpecOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    TableSpec

    public static final class TableSpec.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
    implements TableSpecOrBuilder
     A specification of a relational table.
     The table's schema is represented via its child column specs. It is
     pre-populated as part of ImportData by schema inference algorithm, the
     version of which is a required parameter of ImportData InputConfig.
     Note: While working with a table, at times the schema may be
     inconsistent with the data in the table (e.g. string in a FLOAT64 column).
     The consistency validation is done upon creation of a model.
     Used by:
       *   Tables
     
    Protobuf type google.cloud.automl.v1beta1.TableSpec
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • clear

        public TableSpec.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • getDefaultInstanceForType

        public TableSpec getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public TableSpec build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public TableSpec buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public TableSpec.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • setField

        public TableSpec.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                          Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • clearField

        public TableSpec.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • clearOneof

        public TableSpec.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • setRepeatedField

        public TableSpec.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  int index,
                                                  Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • addRepeatedField

        public TableSpec.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • mergeFrom

        public TableSpec.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TableSpec.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • mergeFrom

        public TableSpec.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TableSpec.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Output only. The resource name of the table spec.
         Form:
        
         `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
         
        string name = 1;
        Specified by:
        getName in interface TableSpecOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. The resource name of the table spec.
         Form:
        
         `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
         
        string name = 1;
        Specified by:
        getNameBytes in interface TableSpecOrBuilder
        Returns:
        The bytes for name.
      • setName

        public TableSpec.Builder setName​(String value)
         Output only. The resource name of the table spec.
         Form:
        
         `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public TableSpec.Builder clearName()
         Output only. The resource name of the table spec.
         Form:
        
         `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public TableSpec.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. The resource name of the table spec.
         Form:
        
         `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getTimeColumnSpecId

        public String getTimeColumnSpecId()
         column_spec_id of the time column. Only used if the parent dataset's
         ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
         and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
         those in between to VALIDATE.
         Required type: TIMESTAMP.
         If both this column and ml_use_column are not set, then ML use of all rows
         will be assigned by AutoML. NOTE: Updates of this field will instantly
         affect any other users concurrently working with the dataset.
         
        string time_column_spec_id = 2;
        Specified by:
        getTimeColumnSpecId in interface TableSpecOrBuilder
        Returns:
        The timeColumnSpecId.
      • getTimeColumnSpecIdBytes

        public com.google.protobuf.ByteString getTimeColumnSpecIdBytes()
         column_spec_id of the time column. Only used if the parent dataset's
         ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
         and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
         those in between to VALIDATE.
         Required type: TIMESTAMP.
         If both this column and ml_use_column are not set, then ML use of all rows
         will be assigned by AutoML. NOTE: Updates of this field will instantly
         affect any other users concurrently working with the dataset.
         
        string time_column_spec_id = 2;
        Specified by:
        getTimeColumnSpecIdBytes in interface TableSpecOrBuilder
        Returns:
        The bytes for timeColumnSpecId.
      • setTimeColumnSpecId

        public TableSpec.Builder setTimeColumnSpecId​(String value)
         column_spec_id of the time column. Only used if the parent dataset's
         ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
         and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
         those in between to VALIDATE.
         Required type: TIMESTAMP.
         If both this column and ml_use_column are not set, then ML use of all rows
         will be assigned by AutoML. NOTE: Updates of this field will instantly
         affect any other users concurrently working with the dataset.
         
        string time_column_spec_id = 2;
        Parameters:
        value - The timeColumnSpecId to set.
        Returns:
        This builder for chaining.
      • clearTimeColumnSpecId

        public TableSpec.Builder clearTimeColumnSpecId()
         column_spec_id of the time column. Only used if the parent dataset's
         ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
         and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
         those in between to VALIDATE.
         Required type: TIMESTAMP.
         If both this column and ml_use_column are not set, then ML use of all rows
         will be assigned by AutoML. NOTE: Updates of this field will instantly
         affect any other users concurrently working with the dataset.
         
        string time_column_spec_id = 2;
        Returns:
        This builder for chaining.
      • setTimeColumnSpecIdBytes

        public TableSpec.Builder setTimeColumnSpecIdBytes​(com.google.protobuf.ByteString value)
         column_spec_id of the time column. Only used if the parent dataset's
         ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
         and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
         those in between to VALIDATE.
         Required type: TIMESTAMP.
         If both this column and ml_use_column are not set, then ML use of all rows
         will be assigned by AutoML. NOTE: Updates of this field will instantly
         affect any other users concurrently working with the dataset.
         
        string time_column_spec_id = 2;
        Parameters:
        value - The bytes for timeColumnSpecId to set.
        Returns:
        This builder for chaining.
      • getRowCount

        public long getRowCount()
         Output only. The number of rows (i.e. examples) in the table.
         
        int64 row_count = 3;
        Specified by:
        getRowCount in interface TableSpecOrBuilder
        Returns:
        The rowCount.
      • setRowCount

        public TableSpec.Builder setRowCount​(long value)
         Output only. The number of rows (i.e. examples) in the table.
         
        int64 row_count = 3;
        Parameters:
        value - The rowCount to set.
        Returns:
        This builder for chaining.
      • clearRowCount

        public TableSpec.Builder clearRowCount()
         Output only. The number of rows (i.e. examples) in the table.
         
        int64 row_count = 3;
        Returns:
        This builder for chaining.
      • getValidRowCount

        public long getValidRowCount()
         Output only. The number of valid rows (i.e. without values that don't match
         DataType-s of their columns).
         
        int64 valid_row_count = 4;
        Specified by:
        getValidRowCount in interface TableSpecOrBuilder
        Returns:
        The validRowCount.
      • setValidRowCount

        public TableSpec.Builder setValidRowCount​(long value)
         Output only. The number of valid rows (i.e. without values that don't match
         DataType-s of their columns).
         
        int64 valid_row_count = 4;
        Parameters:
        value - The validRowCount to set.
        Returns:
        This builder for chaining.
      • clearValidRowCount

        public TableSpec.Builder clearValidRowCount()
         Output only. The number of valid rows (i.e. without values that don't match
         DataType-s of their columns).
         
        int64 valid_row_count = 4;
        Returns:
        This builder for chaining.
      • getColumnCount

        public long getColumnCount()
         Output only. The number of columns of the table. That is, the number of
         child ColumnSpec-s.
         
        int64 column_count = 7;
        Specified by:
        getColumnCount in interface TableSpecOrBuilder
        Returns:
        The columnCount.
      • setColumnCount

        public TableSpec.Builder setColumnCount​(long value)
         Output only. The number of columns of the table. That is, the number of
         child ColumnSpec-s.
         
        int64 column_count = 7;
        Parameters:
        value - The columnCount to set.
        Returns:
        This builder for chaining.
      • clearColumnCount

        public TableSpec.Builder clearColumnCount()
         Output only. The number of columns of the table. That is, the number of
         child ColumnSpec-s.
         
        int64 column_count = 7;
        Returns:
        This builder for chaining.
      • getInputConfigsList

        public List<InputConfig> getInputConfigsList()
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
        Specified by:
        getInputConfigsList in interface TableSpecOrBuilder
      • getInputConfigsCount

        public int getInputConfigsCount()
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
        Specified by:
        getInputConfigsCount in interface TableSpecOrBuilder
      • getInputConfigs

        public InputConfig getInputConfigs​(int index)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
        Specified by:
        getInputConfigs in interface TableSpecOrBuilder
      • setInputConfigs

        public TableSpec.Builder setInputConfigs​(int index,
                                                 InputConfig value)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • setInputConfigs

        public TableSpec.Builder setInputConfigs​(int index,
                                                 InputConfig.Builder builderForValue)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • addInputConfigs

        public TableSpec.Builder addInputConfigs​(InputConfig value)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • addInputConfigs

        public TableSpec.Builder addInputConfigs​(int index,
                                                 InputConfig value)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • addInputConfigs

        public TableSpec.Builder addInputConfigs​(InputConfig.Builder builderForValue)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • addInputConfigs

        public TableSpec.Builder addInputConfigs​(int index,
                                                 InputConfig.Builder builderForValue)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • addAllInputConfigs

        public TableSpec.Builder addAllInputConfigs​(Iterable<? extends InputConfig> values)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • clearInputConfigs

        public TableSpec.Builder clearInputConfigs()
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • removeInputConfigs

        public TableSpec.Builder removeInputConfigs​(int index)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • getInputConfigsBuilder

        public InputConfig.Builder getInputConfigsBuilder​(int index)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • getInputConfigsOrBuilder

        public InputConfigOrBuilder getInputConfigsOrBuilder​(int index)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
        Specified by:
        getInputConfigsOrBuilder in interface TableSpecOrBuilder
      • addInputConfigsBuilder

        public InputConfig.Builder addInputConfigsBuilder()
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • addInputConfigsBuilder

        public InputConfig.Builder addInputConfigsBuilder​(int index)
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • getInputConfigsBuilderList

        public List<InputConfig.Builder> getInputConfigsBuilderList()
         Output only. Input configs via which data currently residing in the table
         had been imported.
         
        repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5;
      • getEtag

        public String getEtag()
         Used to perform consistent read-modify-write updates. If not set, a blind
         "overwrite" update happens.
         
        string etag = 6;
        Specified by:
        getEtag in interface TableSpecOrBuilder
        Returns:
        The etag.
      • getEtagBytes

        public com.google.protobuf.ByteString getEtagBytes()
         Used to perform consistent read-modify-write updates. If not set, a blind
         "overwrite" update happens.
         
        string etag = 6;
        Specified by:
        getEtagBytes in interface TableSpecOrBuilder
        Returns:
        The bytes for etag.
      • setEtag

        public TableSpec.Builder setEtag​(String value)
         Used to perform consistent read-modify-write updates. If not set, a blind
         "overwrite" update happens.
         
        string etag = 6;
        Parameters:
        value - The etag to set.
        Returns:
        This builder for chaining.
      • clearEtag

        public TableSpec.Builder clearEtag()
         Used to perform consistent read-modify-write updates. If not set, a blind
         "overwrite" update happens.
         
        string etag = 6;
        Returns:
        This builder for chaining.
      • setEtagBytes

        public TableSpec.Builder setEtagBytes​(com.google.protobuf.ByteString value)
         Used to perform consistent read-modify-write updates. If not set, a blind
         "overwrite" update happens.
         
        string etag = 6;
        Parameters:
        value - The bytes for etag to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final TableSpec.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>
      • mergeUnknownFields

        public final TableSpec.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TableSpec.Builder>