Class TranslateTextRequest.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
- com.google.cloud.translate.v3beta1.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.GeneratedMessageV3.Builder<TranslateTextRequest.Builder> implements TranslateTextRequestOrBuilder
The request message for synchronous translation.
Protobuf typegoogle.cloud.translation.v3beta1.TranslateTextRequest
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
clear
public TranslateTextRequest.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
getDefaultInstanceForType
public TranslateTextRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public TranslateTextRequest build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TranslateTextRequest buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TranslateTextRequest.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
setField
public TranslateTextRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
clearField
public TranslateTextRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
clearOneof
public TranslateTextRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
setRepeatedField
public TranslateTextRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
addRepeatedField
public TranslateTextRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
mergeFrom
public TranslateTextRequest.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TranslateTextRequest.Builder>
-
mergeFrom
public TranslateTextRequest.Builder mergeFrom(TranslateTextRequest other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
mergeFrom
public TranslateTextRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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 30k 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:
getContentsList
in 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 30k 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:
getContentsCount
in interfaceTranslateTextRequestOrBuilder
- Returns:
- The count of contents.
-
getContents
public String getContents(int index)
Required. The content of the input in string format. We recommend the total content be less than 30k 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:
getContents
in 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 30k 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:
getContentsBytes
in interfaceTranslateTextRequestOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the contents at the given index.
-
setContents
public TranslateTextRequest.Builder setContents(int index, String value)
Required. The content of the input in string format. We recommend the total content be less than 30k 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
public TranslateTextRequest.Builder addContents(String value)
Required. The content of the input in string format. We recommend the total content be less than 30k 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
public TranslateTextRequest.Builder addAllContents(Iterable<String> values)
Required. The content of the input in string format. We recommend the total content be less than 30k 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
public TranslateTextRequest.Builder clearContents()
Required. The content of the input in string format. We recommend the total content be less than 30k 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
public TranslateTextRequest.Builder addContentsBytes(com.google.protobuf.ByteString value)
Required. The content of the input in string format. We recommend the total content be less than 30k 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
public String 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:
getMimeType
in 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:
getMimeTypeBytes
in interfaceTranslateTextRequestOrBuilder
- Returns:
- The bytes for mimeType.
-
setMimeType
public TranslateTextRequest.Builder setMimeType(String value)
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
public TranslateTextRequest.Builder 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
public TranslateTextRequest.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
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
public String getSourceLanguageCode()
Optional. The BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. 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:
getSourceLanguageCode
in interfaceTranslateTextRequestOrBuilder
- Returns:
- The sourceLanguageCode.
-
getSourceLanguageCodeBytes
public com.google.protobuf.ByteString getSourceLanguageCodeBytes()
Optional. The BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. 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:
getSourceLanguageCodeBytes
in interfaceTranslateTextRequestOrBuilder
- Returns:
- The bytes for sourceLanguageCode.
-
setSourceLanguageCode
public TranslateTextRequest.Builder setSourceLanguageCode(String value)
Optional. The BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. 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
public TranslateTextRequest.Builder clearSourceLanguageCode()
Optional. The BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. 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 BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. 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
public String getTargetLanguageCode()
Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getTargetLanguageCode
in interfaceTranslateTextRequestOrBuilder
- Returns:
- The targetLanguageCode.
-
getTargetLanguageCodeBytes
public com.google.protobuf.ByteString getTargetLanguageCodeBytes()
Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getTargetLanguageCodeBytes
in interfaceTranslateTextRequestOrBuilder
- Returns:
- The bytes for targetLanguageCode.
-
setTargetLanguageCode
public TranslateTextRequest.Builder setTargetLanguageCode(String value)
Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The targetLanguageCode to set.- Returns:
- This builder for chaining.
-
clearTargetLanguageCode
public TranslateTextRequest.Builder clearTargetLanguageCode()
Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
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 BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The bytes for targetLanguageCode to set.- Returns:
- This builder for chaining.
-
getParent
public String 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:
getParent
in 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:
getParentBytes
in interfaceTranslateTextRequestOrBuilder
- Returns:
- The bytes for parent.
-
setParent
public TranslateTextRequest.Builder setParent(String value)
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
public TranslateTextRequest.Builder 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
public TranslateTextRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
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
public String 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`, 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 used
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getModel
in 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`, 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 used
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getModelBytes
in interfaceTranslateTextRequestOrBuilder
- Returns:
- The bytes for model.
-
setModel
public TranslateTextRequest.Builder setModel(String value)
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`, 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 used
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The model to set.- Returns:
- This builder for chaining.
-
clearModel
public TranslateTextRequest.Builder 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`, 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 used
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
setModelBytes
public TranslateTextRequest.Builder setModelBytes(com.google.protobuf.ByteString value)
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`, 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 used
string 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.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
hasGlossaryConfig
in interfaceTranslateTextRequestOrBuilder
- Returns:
- Whether the glossaryConfig field is set.
-
getGlossaryConfig
public TranslateTextGlossaryConfig 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.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getGlossaryConfig
in interfaceTranslateTextRequestOrBuilder
- Returns:
- The glossaryConfig.
-
setGlossaryConfig
public TranslateTextRequest.Builder setGlossaryConfig(TranslateTextGlossaryConfig 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.
.google.cloud.translation.v3beta1.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.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
-
mergeGlossaryConfig
public TranslateTextRequest.Builder mergeGlossaryConfig(TranslateTextGlossaryConfig 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.
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
-
clearGlossaryConfig
public TranslateTextRequest.Builder 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.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
-
getGlossaryConfigBuilder
public TranslateTextGlossaryConfig.Builder 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.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
-
getGlossaryConfigOrBuilder
public TranslateTextGlossaryConfigOrBuilder 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.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getGlossaryConfigOrBuilder
in interfaceTranslateTextRequestOrBuilder
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:TranslateTextRequestOrBuilder
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/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getLabelsCount
in interfaceTranslateTextRequestOrBuilder
-
containsLabels
public boolean containsLabels(String key)
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/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
containsLabels
in interfaceTranslateTextRequestOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceTranslateTextRequestOrBuilder
-
getLabelsMap
public Map<String,String> 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/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getLabelsMap
in interfaceTranslateTextRequestOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, String defaultValue)
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/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getLabelsOrDefault
in interfaceTranslateTextRequestOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
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/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getLabelsOrThrow
in interfaceTranslateTextRequestOrBuilder
-
clearLabels
public TranslateTextRequest.Builder clearLabels()
-
removeLabels
public TranslateTextRequest.Builder removeLabels(String key)
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/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
-
getMutableLabels
@Deprecated public Map<String,String> getMutableLabels()
Deprecated.Use alternate mutation accessors instead.
-
putLabels
public TranslateTextRequest.Builder putLabels(String key, String value)
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/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
-
putAllLabels
public TranslateTextRequest.Builder putAllLabels(Map<String,String> values)
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/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
-
setUnknownFields
public final TranslateTextRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
mergeUnknownFields
public final TranslateTextRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>
-
-