Package com.google.cloud.translate.v3
Class Model.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Model.Builder>
com.google.cloud.translate.v3.Model.Builder
- All Implemented Interfaces:
ModelOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Model
public static final class Model.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Model.Builder>
implements ModelOrBuilder
A trained translation model.Protobuf type
google.cloud.translation.v3.Model-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Output only.The dataset from which the model is trained, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`The name of the model to show in the interface.The resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`Output only.Output only.Output only.Output only.Output only.Output only.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.The dataset from which the model is trained, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`com.google.protobuf.ByteStringThe dataset from which the model is trained, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe name of the model to show in the interface.com.google.protobuf.ByteStringThe name of the model to show in the interface.getName()The resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`com.google.protobuf.ByteStringThe resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`Output only.com.google.protobuf.ByteStringOutput only.Output only.com.google.protobuf.ByteStringOutput only.intOutput only.intOutput only.com.google.protobuf.TimestampOutput only.com.google.protobuf.Timestamp.BuilderOutput only.com.google.protobuf.TimestampOrBuilderOutput only.intOutput only.booleanOutput only.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeCreateTime(com.google.protobuf.Timestamp value) Output only.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeUpdateTime(com.google.protobuf.Timestamp value) Output only.setCreateTime(com.google.protobuf.Timestamp value) Output only.setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.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}`setDatasetBytes(com.google.protobuf.ByteString value) The dataset from which the model is trained, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`setDisplayName(String value) The name of the model to show in the interface.setDisplayNameBytes(com.google.protobuf.ByteString value) The name of the model to show in the interface.The resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`setNameBytes(com.google.protobuf.ByteString value) The resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`setSourceLanguageCode(String value) Output only.setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) Output only.setTargetLanguageCode(String value) Output only.setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) Output only.setTestExampleCount(int value) Output only.setTrainExampleCount(int value) Output only.setUpdateTime(com.google.protobuf.Timestamp value) Output only.setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) Output only.setValidateExampleCount(int value) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Model.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Model.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Model.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Model.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Model.Builder>
-
mergeFrom
public Model.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Model.Builder>- Throws:
IOException
-
getName
The resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`string name = 1;- Specified by:
getNamein interfaceModelOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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;- Specified by:
getNameBytesin interfaceModelOrBuilder- Returns:
- The bytes for name.
-
setName
The resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setNameBytes
The resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getDisplayNamein interfaceModelOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.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;- Specified by:
getDisplayNameBytesin interfaceModelOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
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;- Parameters:
value- The displayName to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setDisplayNameBytes
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;- Parameters:
value- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getDatasetin interfaceModelOrBuilder- Returns:
- The dataset.
-
getDatasetBytes
public com.google.protobuf.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;- Specified by:
getDatasetBytesin interfaceModelOrBuilder- Returns:
- The bytes for dataset.
-
setDataset
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;- Parameters:
value- The dataset to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setDatasetBytes
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;- Parameters:
value- The bytes for dataset to set.- Returns:
- This builder for chaining.
-
getSourceLanguageCode
Output only. The BCP-47 language code of the source language.
string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSourceLanguageCodein interfaceModelOrBuilder- Returns:
- The sourceLanguageCode.
-
getSourceLanguageCodeBytes
public com.google.protobuf.ByteString getSourceLanguageCodeBytes()Output only. The BCP-47 language code of the source language.
string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSourceLanguageCodeBytesin interfaceModelOrBuilder- Returns:
- The bytes for sourceLanguageCode.
-
setSourceLanguageCode
Output only. The BCP-47 language code of the source language.
string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The sourceLanguageCode to set.- Returns:
- This builder for chaining.
-
clearSourceLanguageCode
Output only. The BCP-47 language code of the source language.
string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setSourceLanguageCodeBytes
Output only. The BCP-47 language code of the source language.
string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for sourceLanguageCode to set.- Returns:
- This builder for chaining.
-
getTargetLanguageCode
Output only. The BCP-47 language code of the target language.
string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getTargetLanguageCodein interfaceModelOrBuilder- Returns:
- The targetLanguageCode.
-
getTargetLanguageCodeBytes
public com.google.protobuf.ByteString getTargetLanguageCodeBytes()Output only. The BCP-47 language code of the target language.
string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getTargetLanguageCodeBytesin interfaceModelOrBuilder- Returns:
- The bytes for targetLanguageCode.
-
setTargetLanguageCode
Output only. The BCP-47 language code of the target language.
string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The targetLanguageCode to set.- Returns:
- This builder for chaining.
-
clearTargetLanguageCode
Output only. The BCP-47 language code of the target language.
string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setTargetLanguageCodeBytes
Output only. The BCP-47 language code of the target language.
string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for targetLanguageCode to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
getTrainExampleCountin interfaceModelOrBuilder- Returns:
- The trainExampleCount.
-
setTrainExampleCount
Output only. Number of examples (sentence pairs) used to train the model.
int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The trainExampleCount to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
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];- Specified by:
getValidateExampleCountin interfaceModelOrBuilder- Returns:
- The validateExampleCount.
-
setValidateExampleCount
Output only. Number of examples (sentence pairs) used to validate the model.
int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The validateExampleCount to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
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];- Specified by:
getTestExampleCountin interfaceModelOrBuilder- Returns:
- The testExampleCount.
-
setTestExampleCount
Output only. Number of examples (sentence pairs) used to test the model.
int32 test_example_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The testExampleCount to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
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];- Specified by:
hasCreateTimein interfaceModelOrBuilder- Returns:
- Whether the createTime field is set.
-
getCreateTime
public com.google.protobuf.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];- Specified by:
getCreateTimein interfaceModelOrBuilder- Returns:
- The createTime.
-
setCreateTime
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]; -
setCreateTime
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]; -
mergeCreateTime
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]; -
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]; -
getCreateTimeBuilder
public com.google.protobuf.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]; -
getCreateTimeOrBuilder
public com.google.protobuf.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];- Specified by:
getCreateTimeOrBuilderin interfaceModelOrBuilder
-
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];- Specified by:
hasUpdateTimein interfaceModelOrBuilder- Returns:
- Whether the updateTime field is set.
-
getUpdateTime
public com.google.protobuf.Timestamp getUpdateTime()Output only. Timestamp when this model was last updated.
.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getUpdateTimein interfaceModelOrBuilder- Returns:
- The updateTime.
-
setUpdateTime
Output only. Timestamp when this model was last updated.
.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setUpdateTime
Output only. Timestamp when this model was last updated.
.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeUpdateTime
Output only. Timestamp when this model was last updated.
.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearUpdateTime
Output only. Timestamp when this model was last updated.
.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getUpdateTimeBuilder
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()Output only. Timestamp when this model was last updated.
.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getUpdateTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()Output only. Timestamp when this model was last updated.
.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getUpdateTimeOrBuilderin interfaceModelOrBuilder
-