Class BigQueryConfig.Builder (1.127.3)

public static final class BigQueryConfig.Builder extends GeneratedMessageV3.Builder<BigQueryConfig.Builder> implements BigQueryConfigOrBuilder

Configuration for a BigQuery subscription.

Protobuf type google.pubsub.v1.BigQueryConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BigQueryConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

build()

public BigQueryConfig build()
Returns
TypeDescription
BigQueryConfig

buildPartial()

public BigQueryConfig buildPartial()
Returns
TypeDescription
BigQueryConfig

clear()

public BigQueryConfig.Builder clear()
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

clearDropUnknownFields()

public BigQueryConfig.Builder clearDropUnknownFields()

Optional. When true and use_topic_schema is true, any fields that are a part of the topic schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.

bool drop_unknown_fields = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BigQueryConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public BigQueryConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

clearState()

public BigQueryConfig.Builder clearState()

Output only. An output-only field that indicates whether or not the subscription can receive messages.

.google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

clearTable()

public BigQueryConfig.Builder clearTable()

Optional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}

string table = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

clearUseTableSchema()

public BigQueryConfig.Builder clearUseTableSchema()

Optional. When true, use the BigQuery table's schema as the columns to write to in BigQuery. use_table_schema and use_topic_schema cannot be enabled at the same time.

bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

clearUseTopicSchema()

public BigQueryConfig.Builder clearUseTopicSchema()

Optional. When true, use the topic's schema as the columns to write to in BigQuery, if it exists. use_topic_schema and use_table_schema cannot be enabled at the same time.

bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

clearWriteMetadata()

public BigQueryConfig.Builder clearWriteMetadata()

Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table. The subscription name, message_id, and publish_time fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.

bool write_metadata = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

clone()

public BigQueryConfig.Builder clone()
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

getDefaultInstanceForType()

public BigQueryConfig getDefaultInstanceForType()
Returns
TypeDescription
BigQueryConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDropUnknownFields()

public boolean getDropUnknownFields()

Optional. When true and use_topic_schema is true, any fields that are a part of the topic schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.

bool drop_unknown_fields = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The dropUnknownFields.

getState()

public BigQueryConfig.State getState()

Output only. An output-only field that indicates whether or not the subscription can receive messages.

.google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BigQueryConfig.State

The state.

getStateValue()

public int getStateValue()

Output only. An output-only field that indicates whether or not the subscription can receive messages.

.google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getTable()

public String getTable()

Optional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}

string table = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The table.

getTableBytes()

public ByteString getTableBytes()

Optional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}

string table = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for table.

getUseTableSchema()

public boolean getUseTableSchema()

Optional. When true, use the BigQuery table's schema as the columns to write to in BigQuery. use_table_schema and use_topic_schema cannot be enabled at the same time.

bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The useTableSchema.

getUseTopicSchema()

public boolean getUseTopicSchema()

Optional. When true, use the topic's schema as the columns to write to in BigQuery, if it exists. use_topic_schema and use_table_schema cannot be enabled at the same time.

bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The useTopicSchema.

getWriteMetadata()

public boolean getWriteMetadata()

Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table. The subscription name, message_id, and publish_time fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.

bool write_metadata = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The writeMetadata.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BigQueryConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BigQueryConfig.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public BigQueryConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

mergeFrom(BigQueryConfig other)

public BigQueryConfig.Builder mergeFrom(BigQueryConfig other)
Parameter
NameDescription
otherBigQueryConfig
Returns
TypeDescription
BigQueryConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BigQueryConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

setDropUnknownFields(boolean value)

public BigQueryConfig.Builder setDropUnknownFields(boolean value)

Optional. When true and use_topic_schema is true, any fields that are a part of the topic schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.

bool drop_unknown_fields = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueboolean

The dropUnknownFields to set.

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BigQueryConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

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

public BigQueryConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

setState(BigQueryConfig.State value)

public BigQueryConfig.Builder setState(BigQueryConfig.State value)

Output only. An output-only field that indicates whether or not the subscription can receive messages.

.google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueBigQueryConfig.State

The state to set.

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

setStateValue(int value)

public BigQueryConfig.Builder setStateValue(int value)

Output only. An output-only field that indicates whether or not the subscription can receive messages.

.google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

setTable(String value)

public BigQueryConfig.Builder setTable(String value)

Optional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}

string table = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The table to set.

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

setTableBytes(ByteString value)

public BigQueryConfig.Builder setTableBytes(ByteString value)

Optional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}

string table = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for table to set.

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final BigQueryConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BigQueryConfig.Builder
Overrides

setUseTableSchema(boolean value)

public BigQueryConfig.Builder setUseTableSchema(boolean value)

Optional. When true, use the BigQuery table's schema as the columns to write to in BigQuery. use_table_schema and use_topic_schema cannot be enabled at the same time.

bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueboolean

The useTableSchema to set.

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

setUseTopicSchema(boolean value)

public BigQueryConfig.Builder setUseTopicSchema(boolean value)

Optional. When true, use the topic's schema as the columns to write to in BigQuery, if it exists. use_topic_schema and use_table_schema cannot be enabled at the same time.

bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueboolean

The useTopicSchema to set.

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.

setWriteMetadata(boolean value)

public BigQueryConfig.Builder setWriteMetadata(boolean value)

Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table. The subscription name, message_id, and publish_time fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.

bool write_metadata = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueboolean

The writeMetadata to set.

Returns
TypeDescription
BigQueryConfig.Builder

This builder for chaining.