Class Schema.Builder (1.52.0)

public static final class Schema.Builder extends GeneratedMessageV3.Builder<Schema.Builder> implements SchemaOrBuilder

Schema information describing the structure and layout of the data.

Protobuf type google.cloud.dataplex.v1.Schema

Implements

SchemaOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllFields(Iterable<? extends Schema.SchemaField> values)

public Schema.Builder addAllFields(Iterable<? extends Schema.SchemaField> values)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.dataplex.v1.Schema.SchemaField>
Returns
Type Description
Schema.Builder

addAllPartitionFields(Iterable<? extends Schema.PartitionField> values)

public Schema.Builder addAllPartitionFields(Iterable<? extends Schema.PartitionField> values)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.dataplex.v1.Schema.PartitionField>
Returns
Type Description
Schema.Builder

addFields(Schema.SchemaField value)

public Schema.Builder addFields(Schema.SchemaField value)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Schema.SchemaField
Returns
Type Description
Schema.Builder

addFields(Schema.SchemaField.Builder builderForValue)

public Schema.Builder addFields(Schema.SchemaField.Builder builderForValue)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Schema.SchemaField.Builder
Returns
Type Description
Schema.Builder

addFields(int index, Schema.SchemaField value)

public Schema.Builder addFields(int index, Schema.SchemaField value)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Schema.SchemaField
Returns
Type Description
Schema.Builder

addFields(int index, Schema.SchemaField.Builder builderForValue)

public Schema.Builder addFields(int index, Schema.SchemaField.Builder builderForValue)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Schema.SchemaField.Builder
Returns
Type Description
Schema.Builder

addFieldsBuilder()

public Schema.SchemaField.Builder addFieldsBuilder()

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Schema.SchemaField.Builder

addFieldsBuilder(int index)

public Schema.SchemaField.Builder addFieldsBuilder(int index)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.SchemaField.Builder

addPartitionFields(Schema.PartitionField value)

public Schema.Builder addPartitionFields(Schema.PartitionField value)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Schema.PartitionField
Returns
Type Description
Schema.Builder

addPartitionFields(Schema.PartitionField.Builder builderForValue)

public Schema.Builder addPartitionFields(Schema.PartitionField.Builder builderForValue)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Schema.PartitionField.Builder
Returns
Type Description
Schema.Builder

addPartitionFields(int index, Schema.PartitionField value)

public Schema.Builder addPartitionFields(int index, Schema.PartitionField value)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Schema.PartitionField
Returns
Type Description
Schema.Builder

addPartitionFields(int index, Schema.PartitionField.Builder builderForValue)

public Schema.Builder addPartitionFields(int index, Schema.PartitionField.Builder builderForValue)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Schema.PartitionField.Builder
Returns
Type Description
Schema.Builder

addPartitionFieldsBuilder()

public Schema.PartitionField.Builder addPartitionFieldsBuilder()

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Schema.PartitionField.Builder

addPartitionFieldsBuilder(int index)

public Schema.PartitionField.Builder addPartitionFieldsBuilder(int index)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.PartitionField.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Schema build()
Returns
Type Description
Schema

buildPartial()

public Schema buildPartial()
Returns
Type Description
Schema

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearFields()

public Schema.Builder clearFields()

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Schema.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPartitionFields()

public Schema.Builder clearPartitionFields()

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Schema.Builder

clearPartitionStyle()

public Schema.Builder clearPartitionStyle()

Optional. The structure of paths containing partition data within the entity.

.google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Schema.Builder

This builder for chaining.

clearUserManaged()

public Schema.Builder clearUserManaged()

Required. Set to true if user-managed or false if managed by Dataplex. The default is false (managed by Dataplex).

  • Set to falseto enable Dataplex discovery to update the schema. including new data discovery, schema inference, and schema evolution. Users retain the ability to input and edit the schema. Dataplex treats schema input by the user as though produced by a previous Dataplex discovery operation, and it will evolve the schema and take action based on that treatment.

  • Set to true to fully manage the entity schema. This setting guarantees that Dataplex will not change schema fields.

bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Schema.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Schema getDefaultInstanceForType()
Returns
Type Description
Schema

getDescriptorForType()

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

getFields(int index)

public Schema.SchemaField getFields(int index)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.SchemaField

getFieldsBuilder(int index)

public Schema.SchemaField.Builder getFieldsBuilder(int index)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.SchemaField.Builder

getFieldsBuilderList()

public List<Schema.SchemaField.Builder> getFieldsBuilderList()

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getFieldsCount()

public int getFieldsCount()

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getFieldsList()

public List<Schema.SchemaField> getFieldsList()

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<SchemaField>

getFieldsOrBuilder(int index)

public Schema.SchemaFieldOrBuilder getFieldsOrBuilder(int index)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.SchemaFieldOrBuilder

getFieldsOrBuilderList()

public List<? extends Schema.SchemaFieldOrBuilder> getFieldsOrBuilderList()

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder>

getPartitionFields(int index)

public Schema.PartitionField getPartitionFields(int index)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.PartitionField

getPartitionFieldsBuilder(int index)

public Schema.PartitionField.Builder getPartitionFieldsBuilder(int index)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.PartitionField.Builder

getPartitionFieldsBuilderList()

public List<Schema.PartitionField.Builder> getPartitionFieldsBuilderList()

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getPartitionFieldsCount()

public int getPartitionFieldsCount()

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getPartitionFieldsList()

public List<Schema.PartitionField> getPartitionFieldsList()

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<PartitionField>

getPartitionFieldsOrBuilder(int index)

public Schema.PartitionFieldOrBuilder getPartitionFieldsOrBuilder(int index)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.PartitionFieldOrBuilder

getPartitionFieldsOrBuilderList()

public List<? extends Schema.PartitionFieldOrBuilder> getPartitionFieldsOrBuilderList()

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder>

getPartitionStyle()

public Schema.PartitionStyle getPartitionStyle()

Optional. The structure of paths containing partition data within the entity.

.google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Schema.PartitionStyle

The partitionStyle.

getPartitionStyleValue()

public int getPartitionStyleValue()

Optional. The structure of paths containing partition data within the entity.

.google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for partitionStyle.

getUserManaged()

public boolean getUserManaged()

Required. Set to true if user-managed or false if managed by Dataplex. The default is false (managed by Dataplex).

  • Set to falseto enable Dataplex discovery to update the schema. including new data discovery, schema inference, and schema evolution. Users retain the ability to input and edit the schema. Dataplex treats schema input by the user as though produced by a previous Dataplex discovery operation, and it will evolve the schema and take action based on that treatment.

  • Set to true to fully manage the entity schema. This setting guarantees that Dataplex will not change schema fields.

bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

The userManaged.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Schema other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeFields(int index)

public Schema.Builder removeFields(int index)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.Builder

removePartitionFields(int index)

public Schema.Builder removePartitionFields(int index)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Schema.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFields(int index, Schema.SchemaField value)

public Schema.Builder setFields(int index, Schema.SchemaField value)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Schema.SchemaField
Returns
Type Description
Schema.Builder

setFields(int index, Schema.SchemaField.Builder builderForValue)

public Schema.Builder setFields(int index, Schema.SchemaField.Builder builderForValue)

Optional. The sequence of fields describing data in table entities. Note: BigQuery SchemaFields are immutable.

repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Schema.SchemaField.Builder
Returns
Type Description
Schema.Builder

setPartitionFields(int index, Schema.PartitionField value)

public Schema.Builder setPartitionFields(int index, Schema.PartitionField value)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Schema.PartitionField
Returns
Type Description
Schema.Builder

setPartitionFields(int index, Schema.PartitionField.Builder builderForValue)

public Schema.Builder setPartitionFields(int index, Schema.PartitionField.Builder builderForValue)

Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.

repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Schema.PartitionField.Builder
Returns
Type Description
Schema.Builder

setPartitionStyle(Schema.PartitionStyle value)

public Schema.Builder setPartitionStyle(Schema.PartitionStyle value)

Optional. The structure of paths containing partition data within the entity.

.google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Schema.PartitionStyle

The partitionStyle to set.

Returns
Type Description
Schema.Builder

This builder for chaining.

setPartitionStyleValue(int value)

public Schema.Builder setPartitionStyleValue(int value)

Optional. The structure of paths containing partition data within the entity.

.google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
Schema.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUserManaged(boolean value)

public Schema.Builder setUserManaged(boolean value)

Required. Set to true if user-managed or false if managed by Dataplex. The default is false (managed by Dataplex).

  • Set to falseto enable Dataplex discovery to update the schema. including new data discovery, schema inference, and schema evolution. Users retain the ability to input and edit the schema. Dataplex treats schema input by the user as though produced by a previous Dataplex discovery operation, and it will evolve the schema and take action based on that treatment.

  • Set to true to fully manage the entity schema. This setting guarantees that Dataplex will not change schema fields.

bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value boolean

The userManaged to set.

Returns
Type Description
Schema.Builder

This builder for chaining.