public static final class DetectLanguageRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder> implements DetectLanguageRequestOrBuilder
The request message for language detection.Protobuf type
google.cloud.translation.v3.DetectLanguageRequest| Modifier and Type | Method and Description |
|---|---|
DetectLanguageRequest.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
DetectLanguageRequest |
build() |
DetectLanguageRequest |
buildPartial() |
DetectLanguageRequest.Builder |
clear() |
DetectLanguageRequest.Builder |
clearContent()
The content of the input stored as a string.
|
DetectLanguageRequest.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
DetectLanguageRequest.Builder |
clearLabels() |
DetectLanguageRequest.Builder |
clearMimeType()
Optional.
|
DetectLanguageRequest.Builder |
clearModel()
Optional.
|
DetectLanguageRequest.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
DetectLanguageRequest.Builder |
clearParent()
Required.
|
DetectLanguageRequest.Builder |
clearSource() |
DetectLanguageRequest.Builder |
clone() |
boolean |
containsLabels(String key)
Optional.
|
String |
getContent()
The content of the input stored as a string.
|
com.google.protobuf.ByteString |
getContentBytes()
The content of the input stored as a string.
|
DetectLanguageRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Map<String,String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
Optional.
|
Map<String,String> |
getLabelsMap()
Optional.
|
String |
getLabelsOrDefault(String key,
String defaultValue)
Optional.
|
String |
getLabelsOrThrow(String key)
Optional.
|
String |
getMimeType()
Optional.
|
com.google.protobuf.ByteString |
getMimeTypeBytes()
Optional.
|
String |
getModel()
Optional.
|
com.google.protobuf.ByteString |
getModelBytes()
Optional.
|
Map<String,String> |
getMutableLabels()
Deprecated.
|
String |
getParent()
Required.
|
com.google.protobuf.ByteString |
getParentBytes()
Required.
|
DetectLanguageRequest.SourceCase |
getSourceCase() |
boolean |
hasContent()
The content of the input stored as a string.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
protected com.google.protobuf.MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
DetectLanguageRequest.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
DetectLanguageRequest.Builder |
mergeFrom(DetectLanguageRequest other) |
DetectLanguageRequest.Builder |
mergeFrom(com.google.protobuf.Message other) |
DetectLanguageRequest.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
DetectLanguageRequest.Builder |
putAllLabels(Map<String,String> values)
Optional.
|
DetectLanguageRequest.Builder |
putLabels(String key,
String value)
Optional.
|
DetectLanguageRequest.Builder |
removeLabels(String key)
Optional.
|
DetectLanguageRequest.Builder |
setContent(String value)
The content of the input stored as a string.
|
DetectLanguageRequest.Builder |
setContentBytes(com.google.protobuf.ByteString value)
The content of the input stored as a string.
|
DetectLanguageRequest.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
DetectLanguageRequest.Builder |
setMimeType(String value)
Optional.
|
DetectLanguageRequest.Builder |
setMimeTypeBytes(com.google.protobuf.ByteString value)
Optional.
|
DetectLanguageRequest.Builder |
setModel(String value)
Optional.
|
DetectLanguageRequest.Builder |
setModelBytes(com.google.protobuf.ByteString value)
Optional.
|
DetectLanguageRequest.Builder |
setParent(String value)
Required.
|
DetectLanguageRequest.Builder |
setParentBytes(com.google.protobuf.ByteString value)
Required.
|
DetectLanguageRequest.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
DetectLanguageRequest.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, 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<DetectLanguageRequest.Builder>protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>public DetectLanguageRequest.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.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<DetectLanguageRequest.Builder>public DetectLanguageRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic DetectLanguageRequest build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic DetectLanguageRequest buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic DetectLanguageRequest.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>public DetectLanguageRequest.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<DetectLanguageRequest.Builder>public DetectLanguageRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>public DetectLanguageRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>public DetectLanguageRequest.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<DetectLanguageRequest.Builder>public DetectLanguageRequest.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<DetectLanguageRequest.Builder>public DetectLanguageRequest.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<DetectLanguageRequest.Builder>public DetectLanguageRequest.Builder mergeFrom(DetectLanguageRequest other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>public DetectLanguageRequest.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<DetectLanguageRequest.Builder>IOExceptionpublic DetectLanguageRequest.SourceCase getSourceCase()
getSourceCase in interface DetectLanguageRequestOrBuilderpublic DetectLanguageRequest.Builder clearSource()
public String getParent()
Required. Project or location to make a call. Must refer to a caller's
project.
Format: `projects/{project-number-or-id}/locations/{location-id}` or
`projects/{project-number-or-id}`.
For global calls, use `projects/{project-number-or-id}/locations/global` or
`projects/{project-number-or-id}`.
Only models within the same region (has same location-id) can be used.
Otherwise an INVALID_ARGUMENT (400) error is returned.
string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getParent in interface DetectLanguageRequestOrBuilderpublic 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}/locations/{location-id}` or
`projects/{project-number-or-id}`.
For global calls, use `projects/{project-number-or-id}/locations/global` or
`projects/{project-number-or-id}`.
Only models within the same region (has same location-id) can be used.
Otherwise an INVALID_ARGUMENT (400) error is returned.
string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getParentBytes in interface DetectLanguageRequestOrBuilderpublic DetectLanguageRequest.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}/locations/{location-id}` or
`projects/{project-number-or-id}`.
For global calls, use `projects/{project-number-or-id}/locations/global` or
`projects/{project-number-or-id}`.
Only models within the same region (has same location-id) can be used.
Otherwise an INVALID_ARGUMENT (400) error is returned.
string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
value - The parent to set.public DetectLanguageRequest.Builder clearParent()
Required. Project or location to make a call. Must refer to a caller's
project.
Format: `projects/{project-number-or-id}/locations/{location-id}` or
`projects/{project-number-or-id}`.
For global calls, use `projects/{project-number-or-id}/locations/global` or
`projects/{project-number-or-id}`.
Only models within the same region (has same location-id) can be used.
Otherwise an INVALID_ARGUMENT (400) error is returned.
string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
public DetectLanguageRequest.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}/locations/{location-id}` or
`projects/{project-number-or-id}`.
For global calls, use `projects/{project-number-or-id}/locations/global` or
`projects/{project-number-or-id}`.
Only models within the same region (has same location-id) can be used.
Otherwise an INVALID_ARGUMENT (400) error is returned.
string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
value - The bytes for parent to set.public String getModel()
Optional. The language detection model to be used.
Format:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}`
Only one language detection model is currently supported:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`.
If not specified, the default model is used.
string model = 4 [(.google.api.field_behavior) = OPTIONAL];getModel in interface DetectLanguageRequestOrBuilderpublic com.google.protobuf.ByteString getModelBytes()
Optional. The language detection model to be used.
Format:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}`
Only one language detection model is currently supported:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`.
If not specified, the default model is used.
string model = 4 [(.google.api.field_behavior) = OPTIONAL];getModelBytes in interface DetectLanguageRequestOrBuilderpublic DetectLanguageRequest.Builder setModel(String value)
Optional. The language detection model to be used.
Format:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}`
Only one language detection model is currently supported:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`.
If not specified, the default model is used.
string model = 4 [(.google.api.field_behavior) = OPTIONAL];value - The model to set.public DetectLanguageRequest.Builder clearModel()
Optional. The language detection model to be used.
Format:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}`
Only one language detection model is currently supported:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`.
If not specified, the default model is used.
string model = 4 [(.google.api.field_behavior) = OPTIONAL];public DetectLanguageRequest.Builder setModelBytes(com.google.protobuf.ByteString value)
Optional. The language detection model to be used.
Format:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}`
Only one language detection model is currently supported:
`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`.
If not specified, the default model is used.
string model = 4 [(.google.api.field_behavior) = OPTIONAL];value - The bytes for model to set.public boolean hasContent()
The content of the input stored as a string.
string content = 1;hasContent in interface DetectLanguageRequestOrBuilderpublic String getContent()
The content of the input stored as a string.
string content = 1;getContent in interface DetectLanguageRequestOrBuilderpublic com.google.protobuf.ByteString getContentBytes()
The content of the input stored as a string.
string content = 1;getContentBytes in interface DetectLanguageRequestOrBuilderpublic DetectLanguageRequest.Builder setContent(String value)
The content of the input stored as a string.
string content = 1;value - The content to set.public DetectLanguageRequest.Builder clearContent()
The content of the input stored as a string.
string content = 1;public DetectLanguageRequest.Builder setContentBytes(com.google.protobuf.ByteString value)
The content of the input stored as a string.
string content = 1;value - The bytes for content to set.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 DetectLanguageRequestOrBuilderpublic 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 DetectLanguageRequestOrBuilderpublic DetectLanguageRequest.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 DetectLanguageRequest.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 DetectLanguageRequest.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 int getLabelsCount()
DetectLanguageRequestOrBuilderOptional. 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 = 6 [(.google.api.field_behavior) = OPTIONAL];getLabelsCount in interface DetectLanguageRequestOrBuilderpublic 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 = 6 [(.google.api.field_behavior) = OPTIONAL];containsLabels in interface DetectLanguageRequestOrBuilder@Deprecated public Map<String,String> getLabels()
getLabelsMap() instead.getLabels in interface DetectLanguageRequestOrBuilderpublic 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 = 6 [(.google.api.field_behavior) = OPTIONAL];getLabelsMap in interface DetectLanguageRequestOrBuilderpublic 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 = 6 [(.google.api.field_behavior) = OPTIONAL];getLabelsOrDefault in interface DetectLanguageRequestOrBuilderpublic 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 = 6 [(.google.api.field_behavior) = OPTIONAL];getLabelsOrThrow in interface DetectLanguageRequestOrBuilderpublic DetectLanguageRequest.Builder clearLabels()
public DetectLanguageRequest.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 = 6 [(.google.api.field_behavior) = OPTIONAL];@Deprecated public Map<String,String> getMutableLabels()
public DetectLanguageRequest.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 = 6 [(.google.api.field_behavior) = OPTIONAL];public DetectLanguageRequest.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 = 6 [(.google.api.field_behavior) = OPTIONAL];public final DetectLanguageRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>public final DetectLanguageRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>Copyright © 2022 Google LLC. All rights reserved.