Class WriteStream.Builder

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

    public static final class WriteStream.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<WriteStream.Builder>
    implements WriteStreamOrBuilder
     Information about a single stream that gets data inside the storage system.
     
    Protobuf type google.cloud.bigquery.storage.v1.WriteStream
    • 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<WriteStream.Builder>
      • clear

        public WriteStream.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<WriteStream.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<WriteStream.Builder>
      • getDefaultInstanceForType

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

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

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

        public WriteStream.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<WriteStream.Builder>
      • setField

        public WriteStream.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<WriteStream.Builder>
      • clearField

        public WriteStream.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<WriteStream.Builder>
      • clearOneof

        public WriteStream.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<WriteStream.Builder>
      • setRepeatedField

        public WriteStream.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<WriteStream.Builder>
      • addRepeatedField

        public WriteStream.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<WriteStream.Builder>
      • mergeFrom

        public WriteStream.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<WriteStream.Builder>
      • isInitialized

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

        public WriteStream.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<WriteStream.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Output only. Name of the stream, in the form
         `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getName in interface WriteStreamOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. Name of the stream, in the form
         `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNameBytes in interface WriteStreamOrBuilder
        Returns:
        The bytes for name.
      • setName

        public WriteStream.Builder setName​(String value)
         Output only. Name of the stream, in the form
         `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public WriteStream.Builder clearName()
         Output only. Name of the stream, in the form
         `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setNameBytes

        public WriteStream.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. Name of the stream, in the form
         `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getTypeValue

        public int getTypeValue()
         Immutable. Type of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getTypeValue in interface WriteStreamOrBuilder
        Returns:
        The enum numeric value on the wire for type.
      • setTypeValue

        public WriteStream.Builder setTypeValue​(int value)
         Immutable. Type of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The enum numeric value on the wire for type to set.
        Returns:
        This builder for chaining.
      • getType

        public WriteStream.Type getType()
         Immutable. Type of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getType in interface WriteStreamOrBuilder
        Returns:
        The type.
      • setType

        public WriteStream.Builder setType​(WriteStream.Type value)
         Immutable. Type of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The type to set.
        Returns:
        This builder for chaining.
      • clearType

        public WriteStream.Builder clearType()
         Immutable. Type of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. Create time of the stream. For the _default stream, this is
         the creation_time of the table.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface WriteStreamOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. Create time of the stream. For the _default stream, this is
         the creation_time of the table.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface WriteStreamOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public WriteStream.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. Create time of the stream. For the _default stream, this is
         the creation_time of the table.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public WriteStream.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. Create time of the stream. For the _default stream, this is
         the creation_time of the table.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public WriteStream.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. Create time of the stream. For the _default stream, this is
         the creation_time of the table.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public WriteStream.Builder clearCreateTime()
         Output only. Create time of the stream. For the _default stream, this is
         the creation_time of the table.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. Create time of the stream. For the _default stream, this is
         the creation_time of the table.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. Create time of the stream. For the _default stream, this is
         the creation_time of the table.
         
        .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface WriteStreamOrBuilder
      • hasCommitTime

        public boolean hasCommitTime()
         Output only. Commit time of the stream.
         If a stream is of `COMMITTED` type, then it will have a commit_time same as
         `create_time`. If the stream is of `PENDING` type, empty commit_time
         means it is not committed.
         
        .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCommitTime in interface WriteStreamOrBuilder
        Returns:
        Whether the commitTime field is set.
      • getCommitTime

        public com.google.protobuf.Timestamp getCommitTime()
         Output only. Commit time of the stream.
         If a stream is of `COMMITTED` type, then it will have a commit_time same as
         `create_time`. If the stream is of `PENDING` type, empty commit_time
         means it is not committed.
         
        .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCommitTime in interface WriteStreamOrBuilder
        Returns:
        The commitTime.
      • setCommitTime

        public WriteStream.Builder setCommitTime​(com.google.protobuf.Timestamp value)
         Output only. Commit time of the stream.
         If a stream is of `COMMITTED` type, then it will have a commit_time same as
         `create_time`. If the stream is of `PENDING` type, empty commit_time
         means it is not committed.
         
        .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCommitTime

        public WriteStream.Builder setCommitTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. Commit time of the stream.
         If a stream is of `COMMITTED` type, then it will have a commit_time same as
         `create_time`. If the stream is of `PENDING` type, empty commit_time
         means it is not committed.
         
        .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCommitTime

        public WriteStream.Builder mergeCommitTime​(com.google.protobuf.Timestamp value)
         Output only. Commit time of the stream.
         If a stream is of `COMMITTED` type, then it will have a commit_time same as
         `create_time`. If the stream is of `PENDING` type, empty commit_time
         means it is not committed.
         
        .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCommitTime

        public WriteStream.Builder clearCommitTime()
         Output only. Commit time of the stream.
         If a stream is of `COMMITTED` type, then it will have a commit_time same as
         `create_time`. If the stream is of `PENDING` type, empty commit_time
         means it is not committed.
         
        .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCommitTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder()
         Output only. Commit time of the stream.
         If a stream is of `COMMITTED` type, then it will have a commit_time same as
         `create_time`. If the stream is of `PENDING` type, empty commit_time
         means it is not committed.
         
        .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCommitTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder()
         Output only. Commit time of the stream.
         If a stream is of `COMMITTED` type, then it will have a commit_time same as
         `create_time`. If the stream is of `PENDING` type, empty commit_time
         means it is not committed.
         
        .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCommitTimeOrBuilder in interface WriteStreamOrBuilder
      • hasTableSchema

        public boolean hasTableSchema()
         Output only. The schema of the destination table. It is only returned in
         `CreateWriteStream` response. Caller should generate data that's
         compatible with this schema to send in initial `AppendRowsRequest`.
         The table schema could go out of date during the life time of the stream.
         
        .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasTableSchema in interface WriteStreamOrBuilder
        Returns:
        Whether the tableSchema field is set.
      • getTableSchema

        public TableSchema getTableSchema()
         Output only. The schema of the destination table. It is only returned in
         `CreateWriteStream` response. Caller should generate data that's
         compatible with this schema to send in initial `AppendRowsRequest`.
         The table schema could go out of date during the life time of the stream.
         
        .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getTableSchema in interface WriteStreamOrBuilder
        Returns:
        The tableSchema.
      • setTableSchema

        public WriteStream.Builder setTableSchema​(TableSchema value)
         Output only. The schema of the destination table. It is only returned in
         `CreateWriteStream` response. Caller should generate data that's
         compatible with this schema to send in initial `AppendRowsRequest`.
         The table schema could go out of date during the life time of the stream.
         
        .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setTableSchema

        public WriteStream.Builder setTableSchema​(TableSchema.Builder builderForValue)
         Output only. The schema of the destination table. It is only returned in
         `CreateWriteStream` response. Caller should generate data that's
         compatible with this schema to send in initial `AppendRowsRequest`.
         The table schema could go out of date during the life time of the stream.
         
        .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeTableSchema

        public WriteStream.Builder mergeTableSchema​(TableSchema value)
         Output only. The schema of the destination table. It is only returned in
         `CreateWriteStream` response. Caller should generate data that's
         compatible with this schema to send in initial `AppendRowsRequest`.
         The table schema could go out of date during the life time of the stream.
         
        .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearTableSchema

        public WriteStream.Builder clearTableSchema()
         Output only. The schema of the destination table. It is only returned in
         `CreateWriteStream` response. Caller should generate data that's
         compatible with this schema to send in initial `AppendRowsRequest`.
         The table schema could go out of date during the life time of the stream.
         
        .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getTableSchemaBuilder

        public TableSchema.Builder getTableSchemaBuilder()
         Output only. The schema of the destination table. It is only returned in
         `CreateWriteStream` response. Caller should generate data that's
         compatible with this schema to send in initial `AppendRowsRequest`.
         The table schema could go out of date during the life time of the stream.
         
        .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getTableSchemaOrBuilder

        public TableSchemaOrBuilder getTableSchemaOrBuilder()
         Output only. The schema of the destination table. It is only returned in
         `CreateWriteStream` response. Caller should generate data that's
         compatible with this schema to send in initial `AppendRowsRequest`.
         The table schema could go out of date during the life time of the stream.
         
        .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getTableSchemaOrBuilder in interface WriteStreamOrBuilder
      • getWriteModeValue

        public int getWriteModeValue()
         Immutable. Mode of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getWriteModeValue in interface WriteStreamOrBuilder
        Returns:
        The enum numeric value on the wire for writeMode.
      • setWriteModeValue

        public WriteStream.Builder setWriteModeValue​(int value)
         Immutable. Mode of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The enum numeric value on the wire for writeMode to set.
        Returns:
        This builder for chaining.
      • getWriteMode

        public WriteStream.WriteMode getWriteMode()
         Immutable. Mode of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getWriteMode in interface WriteStreamOrBuilder
        Returns:
        The writeMode.
      • setWriteMode

        public WriteStream.Builder setWriteMode​(WriteStream.WriteMode value)
         Immutable. Mode of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The writeMode to set.
        Returns:
        This builder for chaining.
      • clearWriteMode

        public WriteStream.Builder clearWriteMode()
         Immutable. Mode of the stream.
         
        .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • getLocation

        public String getLocation()
         Immutable. The geographic location where the stream's dataset resides. See
         https://cloud.google.com/bigquery/docs/locations for supported
         locations.
         
        string location = 8 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getLocation in interface WriteStreamOrBuilder
        Returns:
        The location.
      • getLocationBytes

        public com.google.protobuf.ByteString getLocationBytes()
         Immutable. The geographic location where the stream's dataset resides. See
         https://cloud.google.com/bigquery/docs/locations for supported
         locations.
         
        string location = 8 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getLocationBytes in interface WriteStreamOrBuilder
        Returns:
        The bytes for location.
      • setLocation

        public WriteStream.Builder setLocation​(String value)
         Immutable. The geographic location where the stream's dataset resides. See
         https://cloud.google.com/bigquery/docs/locations for supported
         locations.
         
        string location = 8 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The location to set.
        Returns:
        This builder for chaining.
      • clearLocation

        public WriteStream.Builder clearLocation()
         Immutable. The geographic location where the stream's dataset resides. See
         https://cloud.google.com/bigquery/docs/locations for supported
         locations.
         
        string location = 8 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setLocationBytes

        public WriteStream.Builder setLocationBytes​(com.google.protobuf.ByteString value)
         Immutable. The geographic location where the stream's dataset resides. See
         https://cloud.google.com/bigquery/docs/locations for supported
         locations.
         
        string location = 8 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The bytes for location to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final WriteStream.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<WriteStream.Builder>
      • mergeUnknownFields

        public final WriteStream.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<WriteStream.Builder>