public static final class TranslateTextRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder> implements TranslateTextRequestOrBuilder
The request message for synchronous translation.Protobuf type
google.cloud.translation.v3.TranslateTextRequestgetAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public TranslateTextRequest.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public TranslateTextRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic TranslateTextRequest build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic TranslateTextRequest buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic TranslateTextRequest.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public TranslateTextRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public TranslateTextRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public TranslateTextRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public TranslateTextRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public TranslateTextRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public TranslateTextRequest.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TranslateTextRequest.Builder>public TranslateTextRequest.Builder mergeFrom(TranslateTextRequest other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public TranslateTextRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TranslateTextRequest.Builder>IOExceptionpublic 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];getContentsList in interface TranslateTextRequestOrBuilderpublic 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];getContentsCount in interface TranslateTextRequestOrBuilderpublic 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];getContents in interface TranslateTextRequestOrBuilderindex - The index of the element to return.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];getContentsBytes in interface TranslateTextRequestOrBuilderindex - The index of the value to return.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];index - The index to set the value at.value - The contents to set.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];value - The contents to add.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];values - The contents to add.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];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];value - The bytes of the contents to add.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];getMimeType in interface TranslateTextRequestOrBuilderpublic 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];getMimeTypeBytes in interface TranslateTextRequestOrBuilderpublic 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];value - The mimeType to set.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];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];value - The bytes for mimeType to set.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];getSourceLanguageCode in interface TranslateTextRequestOrBuilderpublic 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];getSourceLanguageCodeBytes in interface TranslateTextRequestOrBuilderpublic 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];value - The sourceLanguageCode to set.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];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];value - The bytes for sourceLanguageCode to set.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];getTargetLanguageCode in interface TranslateTextRequestOrBuilderpublic 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];getTargetLanguageCodeBytes in interface TranslateTextRequestOrBuilderpublic 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];value - The targetLanguageCode to set.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];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];value - The bytes for targetLanguageCode to set.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) = { ... }
getParent in interface TranslateTextRequestOrBuilderpublic 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) = { ... }
getParentBytes in interface TranslateTextRequestOrBuilderpublic 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) = { ... }
value - The parent to set.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) = { ... }
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) = { ... }
value - The bytes for parent to set.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];getModel in interface TranslateTextRequestOrBuilderpublic 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];getModelBytes in interface TranslateTextRequestOrBuilderpublic 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];value - The model to set.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];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];value - The bytes for model to set.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];
hasGlossaryConfig in interface TranslateTextRequestOrBuilderpublic 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.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossaryConfig in interface TranslateTextRequestOrBuilderpublic 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.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
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];
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.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
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.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
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.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
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.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossaryConfigOrBuilder in interface TranslateTextRequestOrBuilderpublic int getLabelsCount()
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];getLabelsCount in interface TranslateTextRequestOrBuilderpublic 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/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];containsLabels in interface TranslateTextRequestOrBuilder@Deprecated public Map<String,String> getLabels()
getLabelsMap() instead.getLabels in interface TranslateTextRequestOrBuilderpublic 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/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];getLabelsMap in interface TranslateTextRequestOrBuilderpublic 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/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];getLabelsOrDefault in interface TranslateTextRequestOrBuilderpublic 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/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];getLabelsOrThrow in interface TranslateTextRequestOrBuilderpublic TranslateTextRequest.Builder clearLabels()
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/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];@Deprecated public Map<String,String> getMutableLabels()
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/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];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/advanced/labels for more information.
map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];public final TranslateTextRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>public final TranslateTextRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateTextRequest.Builder>Copyright © 2022 Google LLC. All rights reserved.