Package com.google.cloud.translate.v3
Class AdaptiveMtTranslateRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AdaptiveMtTranslateRequest.Builder>
com.google.cloud.translate.v3.AdaptiveMtTranslateRequest.Builder
- All Implemented Interfaces:
AdaptiveMtTranslateRequestOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- AdaptiveMtTranslateRequest
public static final class AdaptiveMtTranslateRequest.Builder
extends com.google.protobuf.GeneratedMessage.Builder<AdaptiveMtTranslateRequest.Builder>
implements AdaptiveMtTranslateRequestOrBuilder
The request for sending an AdaptiveMt translation query.Protobuf type
google.cloud.translation.v3.AdaptiveMtTranslateRequest-
Method Summary
Modifier and TypeMethodDescriptionaddAllContent(Iterable<String> values) Required.addContent(String value) Required.addContentBytes(com.google.protobuf.ByteString value) Required.build()clear()Required.Required.Optional.The format of the source text.Required.Configuration for caller provided reference sentences.getContent(int index) Required.com.google.protobuf.ByteStringgetContentBytes(int index) Required.intRequired.com.google.protobuf.ProtocolStringListRequired.Required.com.google.protobuf.ByteStringRequired.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.Optional.Optional.The format of the source text.com.google.protobuf.ByteStringThe format of the source text.Required.com.google.protobuf.ByteStringRequired.Configuration for caller provided reference sentences.Configuration for caller provided reference sentences.Configuration for caller provided reference sentences.booleanOptional.booleanConfiguration for caller provided reference sentences.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.Configuration for caller provided reference sentences.setContent(int index, String value) Required.setDataset(String value) Required.setDatasetBytes(com.google.protobuf.ByteString value) Required.Optional.setGlossaryConfig(AdaptiveMtTranslateRequest.GlossaryConfig.Builder builderForValue) Optional.setMimeType(String value) The format of the source text.setMimeTypeBytes(com.google.protobuf.ByteString value) The format of the source text.Required.setParentBytes(com.google.protobuf.ByteString value) Required.Configuration for caller provided reference sentences.setReferenceSentenceConfig(AdaptiveMtTranslateRequest.ReferenceSentenceConfig.Builder builderForValue) Configuration for caller provided reference sentences.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<AdaptiveMtTranslateRequest.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<AdaptiveMtTranslateRequest.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<AdaptiveMtTranslateRequest.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<AdaptiveMtTranslateRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<AdaptiveMtTranslateRequest.Builder>
-
mergeFrom
public AdaptiveMtTranslateRequest.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<AdaptiveMtTranslateRequest.Builder>- Throws:
IOException
-
getParent
Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`.string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getParentin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- The parent.
-
getParentBytes
public com.google.protobuf.ByteString getParentBytes()Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`.string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getParentBytesin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- The bytes for parent.
-
setParent
Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`.string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The parent to set.- Returns:
- This builder for chaining.
-
clearParent
Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`.string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setParentBytes
Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`.string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for parent to set.- Returns:
- This builder for chaining.
-
getDataset
Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getDatasetin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- The dataset.
-
getDatasetBytes
public com.google.protobuf.ByteString getDatasetBytes()Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getDatasetBytesin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- The bytes for dataset.
-
setDataset
Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The dataset to set.- Returns:
- This builder for chaining.
-
clearDataset
Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setDatasetBytes
Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for dataset to set.- Returns:
- This builder for chaining.
-
getContentList
public com.google.protobuf.ProtocolStringList getContentList()Required. The content of the input in string format.
repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentListin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- A list containing the content.
-
getContentCount
public int getContentCount()Required. The content of the input in string format.
repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentCountin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- The count of content.
-
getContent
Required. The content of the input in string format.
repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentin interfaceAdaptiveMtTranslateRequestOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The content at the given index.
-
getContentBytes
public com.google.protobuf.ByteString getContentBytes(int index) Required. The content of the input in string format.
repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentBytesin interfaceAdaptiveMtTranslateRequestOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the content at the given index.
-
setContent
Required. The content of the input in string format.
repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
index- The index to set the value at.value- The content to set.- Returns:
- This builder for chaining.
-
addContent
Required. The content of the input in string format.
repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The content to add.- Returns:
- This builder for chaining.
-
addAllContent
Required. The content of the input in string format.
repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
values- The content to add.- Returns:
- This builder for chaining.
-
clearContent
Required. The content of the input in string format.
repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
addContentBytes
Required. The content of the input in string format.
repeated string content = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes of the content to add.- Returns:
- This builder for chaining.
-
getMimeType
The format of the source text.
string mime_type = 4;- Specified by:
getMimeTypein interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- The mimeType.
-
getMimeTypeBytes
public com.google.protobuf.ByteString getMimeTypeBytes()The format of the source text.
string mime_type = 4;- Specified by:
getMimeTypeBytesin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- The bytes for mimeType.
-
setMimeType
The format of the source text.
string mime_type = 4;- Parameters:
value- The mimeType to set.- Returns:
- This builder for chaining.
-
clearMimeType
The format of the source text.
string mime_type = 4;- Returns:
- This builder for chaining.
-
setMimeTypeBytes
The format of the source text.
string mime_type = 4;- Parameters:
value- The bytes for mimeType to set.- Returns:
- This builder for chaining.
-
hasReferenceSentenceConfig
public boolean hasReferenceSentenceConfig()Configuration for caller provided reference sentences.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;- Specified by:
hasReferenceSentenceConfigin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- Whether the referenceSentenceConfig field is set.
-
getReferenceSentenceConfig
Configuration for caller provided reference sentences.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;- Specified by:
getReferenceSentenceConfigin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- The referenceSentenceConfig.
-
setReferenceSentenceConfig
public AdaptiveMtTranslateRequest.Builder setReferenceSentenceConfig(AdaptiveMtTranslateRequest.ReferenceSentenceConfig value) Configuration for caller provided reference sentences.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; -
setReferenceSentenceConfig
public AdaptiveMtTranslateRequest.Builder setReferenceSentenceConfig(AdaptiveMtTranslateRequest.ReferenceSentenceConfig.Builder builderForValue) Configuration for caller provided reference sentences.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; -
mergeReferenceSentenceConfig
public AdaptiveMtTranslateRequest.Builder mergeReferenceSentenceConfig(AdaptiveMtTranslateRequest.ReferenceSentenceConfig value) Configuration for caller provided reference sentences.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; -
clearReferenceSentenceConfig
Configuration for caller provided reference sentences.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; -
getReferenceSentenceConfigBuilder
public AdaptiveMtTranslateRequest.ReferenceSentenceConfig.Builder getReferenceSentenceConfigBuilder()Configuration for caller provided reference sentences.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; -
getReferenceSentenceConfigOrBuilder
public AdaptiveMtTranslateRequest.ReferenceSentenceConfigOrBuilder getReferenceSentenceConfigOrBuilder()Configuration for caller provided reference sentences.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6;- Specified by:
getReferenceSentenceConfigOrBuilderin interfaceAdaptiveMtTranslateRequestOrBuilder
-
hasGlossaryConfig
public boolean hasGlossaryConfig()Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasGlossaryConfigin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- Whether the glossaryConfig field is set.
-
getGlossaryConfig
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGlossaryConfigin interfaceAdaptiveMtTranslateRequestOrBuilder- Returns:
- The glossaryConfig.
-
setGlossaryConfig
public AdaptiveMtTranslateRequest.Builder setGlossaryConfig(AdaptiveMtTranslateRequest.GlossaryConfig value) Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
setGlossaryConfig
public AdaptiveMtTranslateRequest.Builder setGlossaryConfig(AdaptiveMtTranslateRequest.GlossaryConfig.Builder builderForValue) Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
mergeGlossaryConfig
public AdaptiveMtTranslateRequest.Builder mergeGlossaryConfig(AdaptiveMtTranslateRequest.GlossaryConfig value) Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
clearGlossaryConfig
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
getGlossaryConfigBuilder
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
getGlossaryConfigOrBuilder
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGlossaryConfigOrBuilderin interfaceAdaptiveMtTranslateRequestOrBuilder
-