Class Model.Builder (2.54.0)

public static final class Model.Builder extends GeneratedMessageV3.Builder<Model.Builder> implements ModelOrBuilder

A trained translation model.

Protobuf type google.cloud.translation.v3.Model

Implements

ModelOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Model build()
Returns
Type Description
Model

buildPartial()

public Model buildPartial()
Returns
Type Description
Model

clear()

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

clearCreateTime()

public Model.Builder clearCreateTime()

Output only. Timestamp when the model resource was created, which is also when the training started.

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

Returns
Type Description
Model.Builder

clearDataset()

public Model.Builder clearDataset()

The dataset from which the model is trained, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string dataset = 3;

Returns
Type Description
Model.Builder

This builder for chaining.

clearDisplayName()

public Model.Builder clearDisplayName()

The name of the model 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
Model.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Model.Builder clearName()

The resource name of the model, in form of projects/{project-number-or-id}/locations/{location_id}/models/{model_id}

string name = 1;

Returns
Type Description
Model.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSourceLanguageCode()

public Model.Builder clearSourceLanguageCode()

Output only. The BCP-47 language code of the source language.

string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Model.Builder

This builder for chaining.

clearTargetLanguageCode()

public Model.Builder clearTargetLanguageCode()

Output only. The BCP-47 language code of the target language.

string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Model.Builder

This builder for chaining.

clearTestExampleCount()

public Model.Builder clearTestExampleCount()

Output only. Number of examples (sentence pairs) used to test the model.

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

Returns
Type Description
Model.Builder

This builder for chaining.

clearTrainExampleCount()

public Model.Builder clearTrainExampleCount()

Output only. Number of examples (sentence pairs) used to train the model.

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

Returns
Type Description
Model.Builder

This builder for chaining.

clearUpdateTime()

public Model.Builder clearUpdateTime()

Output only. Timestamp when this model was last updated.

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

Returns
Type Description
Model.Builder

clearValidateExampleCount()

public Model.Builder clearValidateExampleCount()

Output only. Number of examples (sentence pairs) used to validate the model.

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

Returns
Type Description
Model.Builder

This builder for chaining.

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Output only. Timestamp when the model resource was created, which is also when the training started.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Timestamp when the model resource was created, which is also when the training started.

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

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Timestamp when the model resource was created, which is also when the training started.

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

Returns
Type Description
TimestampOrBuilder

getDataset()

public String getDataset()

The dataset from which the model is trained, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string dataset = 3;

Returns
Type Description
String

The dataset.

getDatasetBytes()

public ByteString getDatasetBytes()

The dataset from which the model is trained, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string dataset = 3;

Returns
Type Description
ByteString

The bytes for dataset.

getDefaultInstanceForType()

public Model getDefaultInstanceForType()
Returns
Type Description
Model

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

The name of the model 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 model 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.

getName()

public String getName()

The resource name of the model, in form of projects/{project-number-or-id}/locations/{location_id}/models/{model_id}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name of the model, in form of projects/{project-number-or-id}/locations/{location_id}/models/{model_id}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getSourceLanguageCode()

public String getSourceLanguageCode()

Output only. The BCP-47 language code of the source language.

string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The sourceLanguageCode.

getSourceLanguageCodeBytes()

public ByteString getSourceLanguageCodeBytes()

Output only. The BCP-47 language code of the source language.

string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for sourceLanguageCode.

getTargetLanguageCode()

public String getTargetLanguageCode()

Output only. The BCP-47 language code of the target language.

string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The targetLanguageCode.

getTargetLanguageCodeBytes()

public ByteString getTargetLanguageCodeBytes()

Output only. The BCP-47 language code of the target language.

string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for targetLanguageCode.

getTestExampleCount()

public int getTestExampleCount()

Output only. Number of examples (sentence pairs) used to test the model.

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

Returns
Type Description
int

The testExampleCount.

getTrainExampleCount()

public int getTrainExampleCount()

Output only. Number of examples (sentence pairs) used to train the model.

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 model 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 model 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 model 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 examples (sentence pairs) used to validate the model.

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 the model resource was created, which is also when the training started.

.google.protobuf.Timestamp create_time = 8 [(.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 model 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 Model.Builder mergeCreateTime(Timestamp value)

Output only. Timestamp when the model resource was created, which is also when the training started.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Model.Builder

mergeFrom(Model other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public Model.Builder mergeUpdateTime(Timestamp value)

Output only. Timestamp when this model was last updated.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Model.Builder

setCreateTime(Timestamp value)

public Model.Builder setCreateTime(Timestamp value)

Output only. Timestamp when the model resource was created, which is also when the training started.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Model.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Model.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Timestamp when the model resource was created, which is also when the training started.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Model.Builder

setDataset(String value)

public Model.Builder setDataset(String value)

The dataset from which the model is trained, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string dataset = 3;

Parameter
Name Description
value String

The dataset to set.

Returns
Type Description
Model.Builder

This builder for chaining.

setDatasetBytes(ByteString value)

public Model.Builder setDatasetBytes(ByteString value)

The dataset from which the model is trained, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}

string dataset = 3;

Parameter
Name Description
value ByteString

The bytes for dataset to set.

Returns
Type Description
Model.Builder

This builder for chaining.

setDisplayName(String value)

public Model.Builder setDisplayName(String value)

The name of the model 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
Model.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Model.Builder setDisplayNameBytes(ByteString value)

The name of the model 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
Model.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Model.Builder setName(String value)

The resource name of the model, in form of projects/{project-number-or-id}/locations/{location_id}/models/{model_id}

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Model.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Model.Builder setNameBytes(ByteString value)

The resource name of the model, in form of projects/{project-number-or-id}/locations/{location_id}/models/{model_id}

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Model.Builder

This builder for chaining.

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

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

setSourceLanguageCode(String value)

public Model.Builder setSourceLanguageCode(String value)

Output only. The BCP-47 language code of the source language.

string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The sourceLanguageCode to set.

Returns
Type Description
Model.Builder

This builder for chaining.

setSourceLanguageCodeBytes(ByteString value)

public Model.Builder setSourceLanguageCodeBytes(ByteString value)

Output only. The BCP-47 language code of the source language.

string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for sourceLanguageCode to set.

Returns
Type Description
Model.Builder

This builder for chaining.

setTargetLanguageCode(String value)

public Model.Builder setTargetLanguageCode(String value)

Output only. The BCP-47 language code of the target language.

string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The targetLanguageCode to set.

Returns
Type Description
Model.Builder

This builder for chaining.

setTargetLanguageCodeBytes(ByteString value)

public Model.Builder setTargetLanguageCodeBytes(ByteString value)

Output only. The BCP-47 language code of the target language.

string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for targetLanguageCode to set.

Returns
Type Description
Model.Builder

This builder for chaining.

setTestExampleCount(int value)

public Model.Builder setTestExampleCount(int value)

Output only. Number of examples (sentence pairs) used to test the model.

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

Parameter
Name Description
value int

The testExampleCount to set.

Returns
Type Description
Model.Builder

This builder for chaining.

setTrainExampleCount(int value)

public Model.Builder setTrainExampleCount(int value)

Output only. Number of examples (sentence pairs) used to train the model.

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

Parameter
Name Description
value int

The trainExampleCount to set.

Returns
Type Description
Model.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public Model.Builder setUpdateTime(Timestamp value)

Output only. Timestamp when this model was last updated.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Model.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Model.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Timestamp when this model was last updated.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Model.Builder

setValidateExampleCount(int value)

public Model.Builder setValidateExampleCount(int value)

Output only. Number of examples (sentence pairs) used to validate the model.

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

Parameter
Name Description
value int

The validateExampleCount to set.

Returns
Type Description
Model.Builder

This builder for chaining.