Package com.google.cloud.translate.v3
Class TranslateTextRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TranslateTextRequest.Builder>
com.google.cloud.translate.v3.TranslateTextRequest.Builder
- All Implemented Interfaces:
TranslateTextRequestOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- TranslateTextRequest
public static final class TranslateTextRequest.Builder
extends com.google.protobuf.GeneratedMessage.Builder<TranslateTextRequest.Builder>
implements TranslateTextRequestOrBuilder
The request message for synchronous translation.Protobuf type
google.cloud.translation.v3.TranslateTextRequest-
Method Summary
Modifier and TypeMethodDescriptionaddAllContents(Iterable<String> values) Required.addContents(String value) Required.addContentsBytes(com.google.protobuf.ByteString value) Required.build()clear()Required.Optional.Optional.Optional.Required.Optional.Required.Optional.booleancontainsLabels(String key) Optional.getContents(int index) Required.com.google.protobuf.ByteStringgetContentsBytes(int index) Required.intRequired.com.google.protobuf.ProtocolStringListRequired.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.Optional.Optional.Deprecated.intOptional.Optional.getLabelsOrDefault(String key, String defaultValue) Optional.getLabelsOrThrow(String key) Optional.Optional.com.google.protobuf.ByteStringOptional.getModel()Optional.com.google.protobuf.ByteStringOptional.Deprecated.Required.com.google.protobuf.ByteStringRequired.Optional.com.google.protobuf.ByteStringOptional.Required.com.google.protobuf.ByteStringRequired.Optional.Optional.Optional.booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(TranslateTextRequest other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.Optional.putAllLabels(Map<String, String> values) Optional.Optional.removeLabels(String key) Optional.setContents(int index, String value) Required.Optional.setGlossaryConfig(TranslateTextGlossaryConfig.Builder builderForValue) Optional.setMimeType(String value) Optional.setMimeTypeBytes(com.google.protobuf.ByteString value) Optional.Optional.setModelBytes(com.google.protobuf.ByteString value) Optional.Required.setParentBytes(com.google.protobuf.ByteString value) Required.setSourceLanguageCode(String value) Optional.setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) Optional.setTargetLanguageCode(String value) Required.setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) Required.Optional.setTransliterationConfig(TransliterationConfig.Builder builderForValue) Optional.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, internalGetMutableMapField, 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() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<TranslateTextRequest.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<TranslateTextRequest.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<TranslateTextRequest.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<TranslateTextRequest.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<TranslateTextRequest.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<TranslateTextRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<TranslateTextRequest.Builder>
-
mergeFrom
public TranslateTextRequest.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<TranslateTextRequest.Builder>- Throws:
IOException
-
getContentsList
public com.google.protobuf.ProtocolStringList getContentsList()Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentsListin interfaceTranslateTextRequestOrBuilder- Returns:
- A list containing the contents.
-
getContentsCount
public int getContentsCount()Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentsCountin interfaceTranslateTextRequestOrBuilder- Returns:
- The count of contents.
-
getContents
Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentsin interfaceTranslateTextRequestOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The contents at the given index.
-
getContentsBytes
public com.google.protobuf.ByteString getContentsBytes(int index) Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getContentsBytesin interfaceTranslateTextRequestOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the contents at the given index.
-
setContents
Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
index- The index to set the value at.value- The contents to set.- Returns:
- This builder for chaining.
-
addContents
Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The contents to add.- Returns:
- This builder for chaining.
-
addAllContents
Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
values- The contents to add.- Returns:
- This builder for chaining.
-
clearContents
Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
addContentsBytes
Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes of the contents to add.- Returns:
- This builder for chaining.
-
getMimeType
Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMimeTypein interfaceTranslateTextRequestOrBuilder- Returns:
- The mimeType.
-
getMimeTypeBytes
public com.google.protobuf.ByteString getMimeTypeBytes()Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getMimeTypeBytesin interfaceTranslateTextRequestOrBuilder- Returns:
- The bytes for mimeType.
-
setMimeType
Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The mimeType to set.- Returns:
- This builder for chaining.
-
clearMimeType
Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setMimeTypeBytes
Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for mimeType to set.- Returns:
- This builder for chaining.
-
getSourceLanguageCode
Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSourceLanguageCodein interfaceTranslateTextRequestOrBuilder- Returns:
- The sourceLanguageCode.
-
getSourceLanguageCodeBytes
public com.google.protobuf.ByteString getSourceLanguageCodeBytes()Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSourceLanguageCodeBytesin interfaceTranslateTextRequestOrBuilder- Returns:
- The bytes for sourceLanguageCode.
-
setSourceLanguageCode
Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The sourceLanguageCode to set.- Returns:
- This builder for chaining.
-
clearSourceLanguageCode
Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setSourceLanguageCodeBytes
public TranslateTextRequest.Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for sourceLanguageCode to set.- Returns:
- This builder for chaining.
-
getTargetLanguageCode
Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTargetLanguageCodein interfaceTranslateTextRequestOrBuilder- Returns:
- The targetLanguageCode.
-
getTargetLanguageCodeBytes
public com.google.protobuf.ByteString getTargetLanguageCodeBytes()Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTargetLanguageCodeBytesin interfaceTranslateTextRequestOrBuilder- Returns:
- The bytes for targetLanguageCode.
-
setTargetLanguageCode
Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The targetLanguageCode to set.- Returns:
- This builder for chaining.
-
clearTargetLanguageCode
Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setTargetLanguageCodeBytes
public TranslateTextRequest.Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for targetLanguageCode to set.- Returns:
- This builder for chaining.
-
getParent
Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getParentin interfaceTranslateTextRequestOrBuilder- Returns:
- The parent.
-
getParentBytes
public com.google.protobuf.ByteString getParentBytes()Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getParentBytesin interfaceTranslateTextRequestOrBuilder- Returns:
- The bytes for parent.
-
setParent
Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The parent to set.- Returns:
- This builder for chaining.
-
clearParent
Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setParentBytes
Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for parent to set.- Returns:
- This builder for chaining.
-
getModel
Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - Translation LLM models: `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be usedstring model = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getModelin interfaceTranslateTextRequestOrBuilder- Returns:
- The model.
-
getModelBytes
public com.google.protobuf.ByteString getModelBytes()Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - Translation LLM models: `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be usedstring model = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getModelBytesin interfaceTranslateTextRequestOrBuilder- Returns:
- The bytes for model.
-
setModel
Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - Translation LLM models: `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be usedstring model = 6 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The model to set.- Returns:
- This builder for chaining.
-
clearModel
Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - Translation LLM models: `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be usedstring model = 6 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setModelBytes
Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - Translation LLM models: `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be usedstring model = 6 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for model to set.- Returns:
- This builder for chaining.
-
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.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasGlossaryConfigin interfaceTranslateTextRequestOrBuilder- 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.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGlossaryConfigin interfaceTranslateTextRequestOrBuilder- Returns:
- The glossaryConfig.
-
setGlossaryConfig
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.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
setGlossaryConfig
public TranslateTextRequest.Builder setGlossaryConfig(TranslateTextGlossaryConfig.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.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
mergeGlossaryConfig
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.
.google.cloud.translation.v3.TranslateTextGlossaryConfig 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.
.google.cloud.translation.v3.TranslateTextGlossaryConfig 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.
.google.cloud.translation.v3.TranslateTextGlossaryConfig 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.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGlossaryConfigOrBuilderin interfaceTranslateTextRequestOrBuilder
-
hasTransliterationConfig
public boolean hasTransliterationConfig()Optional. Transliteration to be applied.
.google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasTransliterationConfigin interfaceTranslateTextRequestOrBuilder- Returns:
- Whether the transliterationConfig field is set.
-
getTransliterationConfig
Optional. Transliteration to be applied.
.google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTransliterationConfigin interfaceTranslateTextRequestOrBuilder- Returns:
- The transliterationConfig.
-
setTransliterationConfig
Optional. Transliteration to be applied.
.google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; -
setTransliterationConfig
public TranslateTextRequest.Builder setTransliterationConfig(TransliterationConfig.Builder builderForValue) Optional. Transliteration to be applied.
.google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; -
mergeTransliterationConfig
Optional. Transliteration to be applied.
.google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; -
clearTransliterationConfig
Optional. Transliteration to be applied.
.google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; -
getTransliterationConfigBuilder
Optional. Transliteration to be applied.
.google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; -
getTransliterationConfigOrBuilder
Optional. Transliteration to be applied.
.google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTransliterationConfigOrBuilderin interfaceTranslateTextRequestOrBuilder
-
getLabelsCount
public int getLabelsCount()Description copied from interface:TranslateTextRequestOrBuilderOptional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsCountin interfaceTranslateTextRequestOrBuilder
-
containsLabels
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
containsLabelsin interfaceTranslateTextRequestOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceTranslateTextRequestOrBuilder
-
getLabelsMap
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsMapin interfaceTranslateTextRequestOrBuilder
-
getLabelsOrDefault
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsOrDefaultin interfaceTranslateTextRequestOrBuilder
-
getLabelsOrThrow
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsOrThrowin interfaceTranslateTextRequestOrBuilder
-
clearLabels
-
removeLabels
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; -
getMutableLabels
Deprecated.Use alternate mutation accessors instead. -
putLabels
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; -
putAllLabels
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
-