Class Schema.Builder (1.6.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.dataplex.v1.Schema.SchemaField>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.dataplex.v1.Schema.PartitionField>
Returns
TypeDescription
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
NameDescription
valueSchema.SchemaField
Returns
TypeDescription
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
NameDescription
builderForValueSchema.SchemaField.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueSchema.SchemaField
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSchema.SchemaField.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueSchema.PartitionField
Returns
TypeDescription
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
NameDescription
builderForValueSchema.PartitionField.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueSchema.PartitionField
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSchema.PartitionField.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Schema.PartitionField.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Schema build()
Returns
TypeDescription
Schema

buildPartial()

public Schema buildPartial()
Returns
TypeDescription
Schema

clear()

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

clearField(Descriptors.FieldDescriptor field)

public Schema.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
Schema.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Schema.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Schema.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Schema getDefaultInstanceForType()
Returns
TypeDescription
Schema

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

The userManaged.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Schema other)

public Schema.Builder mergeFrom(Schema other)
Parameter
NameDescription
otherSchema
Returns
TypeDescription
Schema.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Schema.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Schema.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Schema.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueSchema.SchemaField
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSchema.SchemaField.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueSchema.PartitionField
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSchema.PartitionField.Builder
Returns
TypeDescription
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
NameDescription
valueSchema.PartitionStyle

The partitionStyle to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Schema.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Schema.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueboolean

The userManaged to set.

Returns
TypeDescription
Schema.Builder

This builder for chaining.