Class Dataset.Builder (2.49.0)

public static final class Dataset.Builder extends GeneratedMessageV3.Builder<Dataset.Builder> implements DatasetOrBuilder

A dataset that hosts the examples (sentence pairs) used for translation models.

Protobuf type google.cloud.translation.v3.Dataset

Implements

DatasetOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Dataset build()
Returns
Type Description
Dataset

buildPartial()

public Dataset buildPartial()
Returns
Type Description
Dataset

clear()

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

clearCreateTime()

public Dataset.Builder clearCreateTime()

Output only. Timestamp when this dataset was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Dataset.Builder

clearDisplayName()

public Dataset.Builder clearDisplayName()

The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.

string display_name = 2;

Returns
Type Description
Dataset.Builder

This builder for chaining.

clearExampleCount()

public Dataset.Builder clearExampleCount()

Output only. The number of examples in the dataset.

int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Dataset.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Dataset.Builder clearName()

The resource name of the dataset, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string name = 1;

Returns
Type Description
Dataset.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSourceLanguageCode()

public Dataset.Builder clearSourceLanguageCode()

The BCP-47 language code of the source language.

string source_language_code = 3;

Returns
Type Description
Dataset.Builder

This builder for chaining.

clearTargetLanguageCode()

public Dataset.Builder clearTargetLanguageCode()

The BCP-47 language code of the target language.

string target_language_code = 4;

Returns
Type Description
Dataset.Builder

This builder for chaining.

clearTestExampleCount()

public Dataset.Builder clearTestExampleCount()

Output only. Number of test examples (sentence pairs).

int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Dataset.Builder

This builder for chaining.

clearTrainExampleCount()

public Dataset.Builder clearTrainExampleCount()

Output only. Number of training examples (sentence pairs).

int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Dataset.Builder

This builder for chaining.

clearUpdateTime()

public Dataset.Builder clearUpdateTime()

Output only. Timestamp when this dataset was last updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Dataset.Builder

clearValidateExampleCount()

public Dataset.Builder clearValidateExampleCount()

Output only. Number of validation examples (sentence pairs).

int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Dataset.Builder

This builder for chaining.

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Output only. Timestamp when this dataset was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Timestamp when this dataset was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Timestamp when this dataset was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Dataset getDefaultInstanceForType()
Returns
Type Description
Dataset

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getExampleCount()

public int getExampleCount()

Output only. The number of examples in the dataset.

int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The exampleCount.

getName()

public String getName()

The resource name of the dataset, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name of the dataset, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getSourceLanguageCode()

public String getSourceLanguageCode()

The BCP-47 language code of the source language.

string source_language_code = 3;

Returns
Type Description
String

The sourceLanguageCode.

getSourceLanguageCodeBytes()

public ByteString getSourceLanguageCodeBytes()

The BCP-47 language code of the source language.

string source_language_code = 3;

Returns
Type Description
ByteString

The bytes for sourceLanguageCode.

getTargetLanguageCode()

public String getTargetLanguageCode()

The BCP-47 language code of the target language.

string target_language_code = 4;

Returns
Type Description
String

The targetLanguageCode.

getTargetLanguageCodeBytes()

public ByteString getTargetLanguageCodeBytes()

The BCP-47 language code of the target language.

string target_language_code = 4;

Returns
Type Description
ByteString

The bytes for targetLanguageCode.

getTestExampleCount()

public int getTestExampleCount()

Output only. Number of test examples (sentence pairs).

int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The testExampleCount.

getTrainExampleCount()

public int getTrainExampleCount()

Output only. Number of training examples (sentence pairs).

int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The trainExampleCount.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Timestamp when this dataset was last updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Timestamp when this dataset was last updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Timestamp when this dataset was last updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getValidateExampleCount()

public int getValidateExampleCount()

Output only. Number of validation examples (sentence pairs).

int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The validateExampleCount.

hasCreateTime()

public boolean hasCreateTime()

Output only. Timestamp when this dataset was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Timestamp when this dataset was last updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Dataset.Builder mergeCreateTime(Timestamp value)

Output only. Timestamp when this dataset was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Dataset.Builder

mergeFrom(Dataset other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public Dataset.Builder mergeUpdateTime(Timestamp value)

Output only. Timestamp when this dataset was last updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Dataset.Builder

setCreateTime(Timestamp value)

public Dataset.Builder setCreateTime(Timestamp value)

Output only. Timestamp when this dataset was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Dataset.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Dataset.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Timestamp when this dataset was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Dataset.Builder

setDisplayName(String value)

public Dataset.Builder setDisplayName(String value)

The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.

string display_name = 2;

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Dataset.Builder setDisplayNameBytes(ByteString value)

The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.

string display_name = 2;

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setExampleCount(int value)

public Dataset.Builder setExampleCount(int value)

Output only. The number of examples in the dataset.

int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The exampleCount to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Dataset.Builder setName(String value)

The resource name of the dataset, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Dataset.Builder setNameBytes(ByteString value)

The resource name of the dataset, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

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

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

setSourceLanguageCode(String value)

public Dataset.Builder setSourceLanguageCode(String value)

The BCP-47 language code of the source language.

string source_language_code = 3;

Parameter
Name Description
value String

The sourceLanguageCode to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setSourceLanguageCodeBytes(ByteString value)

public Dataset.Builder setSourceLanguageCodeBytes(ByteString value)

The BCP-47 language code of the source language.

string source_language_code = 3;

Parameter
Name Description
value ByteString

The bytes for sourceLanguageCode to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setTargetLanguageCode(String value)

public Dataset.Builder setTargetLanguageCode(String value)

The BCP-47 language code of the target language.

string target_language_code = 4;

Parameter
Name Description
value String

The targetLanguageCode to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setTargetLanguageCodeBytes(ByteString value)

public Dataset.Builder setTargetLanguageCodeBytes(ByteString value)

The BCP-47 language code of the target language.

string target_language_code = 4;

Parameter
Name Description
value ByteString

The bytes for targetLanguageCode to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setTestExampleCount(int value)

public Dataset.Builder setTestExampleCount(int value)

Output only. Number of test examples (sentence pairs).

int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The testExampleCount to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setTrainExampleCount(int value)

public Dataset.Builder setTrainExampleCount(int value)

Output only. Number of training examples (sentence pairs).

int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The trainExampleCount to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public Dataset.Builder setUpdateTime(Timestamp value)

Output only. Timestamp when this dataset was last updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Dataset.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Dataset.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Timestamp when this dataset was last updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Dataset.Builder

setValidateExampleCount(int value)

public Dataset.Builder setValidateExampleCount(int value)

Output only. Number of validation examples (sentence pairs).

int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The validateExampleCount to set.

Returns
Type Description
Dataset.Builder

This builder for chaining.