Class TranslationModelMetadata.Builder (2.40.0)

public static final class TranslationModelMetadata.Builder extends GeneratedMessageV3.Builder<TranslationModelMetadata.Builder> implements TranslationModelMetadataOrBuilder

Model metadata that is specific to translation.

Protobuf type google.cloud.automl.v1.TranslationModelMetadata

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TranslationModelMetadata build()
Returns
TypeDescription
TranslationModelMetadata

buildPartial()

public TranslationModelMetadata buildPartial()
Returns
TypeDescription
TranslationModelMetadata

clear()

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

clearBaseModel()

public TranslationModelMetadata.Builder clearBaseModel()

The resource name of the model to use as a baseline to train the custom model. If unset, we use the default base model provided by Google Translate. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

string base_model = 1;

Returns
TypeDescription
TranslationModelMetadata.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSourceLanguageCode()

public TranslationModelMetadata.Builder clearSourceLanguageCode()

Output only. Inferred from the dataset. The source language (The BCP-47 language code) that is used for training.

string source_language_code = 2;

Returns
TypeDescription
TranslationModelMetadata.Builder

This builder for chaining.

clearTargetLanguageCode()

public TranslationModelMetadata.Builder clearTargetLanguageCode()

Output only. The target language (The BCP-47 language code) that is used for training.

string target_language_code = 3;

Returns
TypeDescription
TranslationModelMetadata.Builder

This builder for chaining.

clone()

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

getBaseModel()

public String getBaseModel()

The resource name of the model to use as a baseline to train the custom model. If unset, we use the default base model provided by Google Translate. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

string base_model = 1;

Returns
TypeDescription
String

The baseModel.

getBaseModelBytes()

public ByteString getBaseModelBytes()

The resource name of the model to use as a baseline to train the custom model. If unset, we use the default base model provided by Google Translate. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

string base_model = 1;

Returns
TypeDescription
ByteString

The bytes for baseModel.

getDefaultInstanceForType()

public TranslationModelMetadata getDefaultInstanceForType()
Returns
TypeDescription
TranslationModelMetadata

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getSourceLanguageCode()

public String getSourceLanguageCode()

Output only. Inferred from the dataset. The source language (The BCP-47 language code) that is used for training.

string source_language_code = 2;

Returns
TypeDescription
String

The sourceLanguageCode.

getSourceLanguageCodeBytes()

public ByteString getSourceLanguageCodeBytes()

Output only. Inferred from the dataset. The source language (The BCP-47 language code) that is used for training.

string source_language_code = 2;

Returns
TypeDescription
ByteString

The bytes for sourceLanguageCode.

getTargetLanguageCode()

public String getTargetLanguageCode()

Output only. The target language (The BCP-47 language code) that is used for training.

string target_language_code = 3;

Returns
TypeDescription
String

The targetLanguageCode.

getTargetLanguageCodeBytes()

public ByteString getTargetLanguageCodeBytes()

Output only. The target language (The BCP-47 language code) that is used for training.

string target_language_code = 3;

Returns
TypeDescription
ByteString

The bytes for targetLanguageCode.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TranslationModelMetadata other)

public TranslationModelMetadata.Builder mergeFrom(TranslationModelMetadata other)
Parameter
NameDescription
otherTranslationModelMetadata
Returns
TypeDescription
TranslationModelMetadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBaseModel(String value)

public TranslationModelMetadata.Builder setBaseModel(String value)

The resource name of the model to use as a baseline to train the custom model. If unset, we use the default base model provided by Google Translate. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

string base_model = 1;

Parameter
NameDescription
valueString

The baseModel to set.

Returns
TypeDescription
TranslationModelMetadata.Builder

This builder for chaining.

setBaseModelBytes(ByteString value)

public TranslationModelMetadata.Builder setBaseModelBytes(ByteString value)

The resource name of the model to use as a baseline to train the custom model. If unset, we use the default base model provided by Google Translate. Format: projects/{project_id}/locations/{location_id}/models/{model_id}

string base_model = 1;

Parameter
NameDescription
valueByteString

The bytes for baseModel to set.

Returns
TypeDescription
TranslationModelMetadata.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSourceLanguageCode(String value)

public TranslationModelMetadata.Builder setSourceLanguageCode(String value)

Output only. Inferred from the dataset. The source language (The BCP-47 language code) that is used for training.

string source_language_code = 2;

Parameter
NameDescription
valueString

The sourceLanguageCode to set.

Returns
TypeDescription
TranslationModelMetadata.Builder

This builder for chaining.

setSourceLanguageCodeBytes(ByteString value)

public TranslationModelMetadata.Builder setSourceLanguageCodeBytes(ByteString value)

Output only. Inferred from the dataset. The source language (The BCP-47 language code) that is used for training.

string source_language_code = 2;

Parameter
NameDescription
valueByteString

The bytes for sourceLanguageCode to set.

Returns
TypeDescription
TranslationModelMetadata.Builder

This builder for chaining.

setTargetLanguageCode(String value)

public TranslationModelMetadata.Builder setTargetLanguageCode(String value)

Output only. The target language (The BCP-47 language code) that is used for training.

string target_language_code = 3;

Parameter
NameDescription
valueString

The targetLanguageCode to set.

Returns
TypeDescription
TranslationModelMetadata.Builder

This builder for chaining.

setTargetLanguageCodeBytes(ByteString value)

public TranslationModelMetadata.Builder setTargetLanguageCodeBytes(ByteString value)

Output only. The target language (The BCP-47 language code) that is used for training.

string target_language_code = 3;

Parameter
NameDescription
valueByteString

The bytes for targetLanguageCode to set.

Returns
TypeDescription
TranslationModelMetadata.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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