Class WriteStream.Builder (3.8.0)

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public WriteStream.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
WriteStream.Builder
Overrides

build()

public WriteStream build()
Returns
Type Description
WriteStream

buildPartial()

public WriteStream buildPartial()
Returns
Type Description
WriteStream

clear()

public WriteStream.Builder clear()
Returns
Type Description
WriteStream.Builder
Overrides

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];

Returns
Type Description
WriteStream.Builder

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];

Returns
Type Description
WriteStream.Builder

clearField(Descriptors.FieldDescriptor field)

public WriteStream.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
WriteStream.Builder
Overrides

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
Type Description
WriteStream.Builder

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
Type Description
WriteStream.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public WriteStream.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
WriteStream.Builder
Overrides

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];

Returns
Type Description
WriteStream.Builder

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
Type Description
WriteStream.Builder

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
Type Description
WriteStream.Builder

This builder for chaining.

clone()

public WriteStream.Builder clone()
Returns
Type Description
WriteStream.Builder
Overrides

getCommitTime()

public 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];

Returns
Type Description
Timestamp

The commitTime.

getCommitTimeBuilder()

public 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];

Returns
Type Description
Builder

getCommitTimeOrBuilder()

public 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];

Returns
Type Description
TimestampOrBuilder

getCreateTime()

public 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];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public 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];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public 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];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public WriteStream getDefaultInstanceForType()
Returns
Type Description
WriteStream

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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];

Returns
Type Description
String

The location.

getLocationBytes()

public 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];

Returns
Type Description
ByteString

The bytes for location.

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];

Returns
Type Description
String

The name.

getNameBytes()

public 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];

Returns
Type Description
ByteString

The bytes for name.

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];

Returns
Type Description
TableSchema

The tableSchema.

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];

Returns
Type Description
TableSchema.Builder

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];

Returns
Type Description
TableSchemaOrBuilder

getType()

public WriteStream.Type getType()

Immutable. Type of the stream.

.google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
WriteStream.Type

The type.

getTypeValue()

public int getTypeValue()

Immutable. Type of the stream.

.google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The enum numeric value on the wire for type.

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];

Returns
Type Description
WriteStream.WriteMode

The writeMode.

getWriteModeValue()

public int getWriteModeValue()

Immutable. Mode of the stream.

.google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The enum numeric value on the wire for writeMode.

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];

Returns
Type Description
boolean

Whether the commitTime field is set.

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];

Returns
Type Description
boolean

Whether the createTime field is set.

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];

Returns
Type Description
boolean

Whether the tableSchema field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCommitTime(Timestamp value)

public WriteStream.Builder mergeCommitTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
WriteStream.Builder

mergeCreateTime(Timestamp value)

public WriteStream.Builder mergeCreateTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
WriteStream.Builder

mergeFrom(WriteStream other)

public WriteStream.Builder mergeFrom(WriteStream other)
Parameter
Name Description
other WriteStream
Returns
Type Description
WriteStream.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public WriteStream.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WriteStream.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public WriteStream.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
WriteStream.Builder
Overrides

mergeTableSchema(TableSchema value)

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];

Parameter
Name Description
value TableSchema
Returns
Type Description
WriteStream.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final WriteStream.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
WriteStream.Builder
Overrides

setCommitTime(Timestamp value)

public WriteStream.Builder setCommitTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
WriteStream.Builder

setCommitTime(Timestamp.Builder builderForValue)

public WriteStream.Builder setCommitTime(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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
WriteStream.Builder

setCreateTime(Timestamp value)

public WriteStream.Builder setCreateTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
WriteStream.Builder

setCreateTime(Timestamp.Builder builderForValue)

public WriteStream.Builder setCreateTime(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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
WriteStream.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public WriteStream.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
WriteStream.Builder
Overrides

setLocation(String value)

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];

Parameter
Name Description
value String

The location to set.

Returns
Type Description
WriteStream.Builder

This builder for chaining.

setLocationBytes(ByteString value)

public WriteStream.Builder setLocationBytes(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];

Parameter
Name Description
value ByteString

The bytes for location to set.

Returns
Type Description
WriteStream.Builder

This builder for chaining.

setName(String value)

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];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
WriteStream.Builder

This builder for chaining.

setNameBytes(ByteString value)

public WriteStream.Builder setNameBytes(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];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
WriteStream.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public WriteStream.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
WriteStream.Builder
Overrides

setTableSchema(TableSchema value)

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];

Parameter
Name Description
value TableSchema
Returns
Type Description
WriteStream.Builder

setTableSchema(TableSchema.Builder builderForValue)

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];

Parameter
Name Description
builderForValue TableSchema.Builder
Returns
Type Description
WriteStream.Builder

setType(WriteStream.Type value)

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];

Parameter
Name Description
value WriteStream.Type

The type to set.

Returns
Type Description
WriteStream.Builder

This builder for chaining.

setTypeValue(int value)

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];

Parameter
Name Description
value int

The enum numeric value on the wire for type to set.

Returns
Type Description
WriteStream.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final WriteStream.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
WriteStream.Builder
Overrides

setWriteMode(WriteStream.WriteMode value)

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];

Parameter
Name Description
value WriteStream.WriteMode

The writeMode to set.

Returns
Type Description
WriteStream.Builder

This builder for chaining.

setWriteModeValue(int value)

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];

Parameter
Name Description
value int

The enum numeric value on the wire for writeMode to set.

Returns
Type Description
WriteStream.Builder

This builder for chaining.