public static final class DetectLanguageRequest.Builder extends GeneratedMessageV3.Builder<DetectLanguageRequest.Builder> implements DetectLanguageRequestOrBuilder
The request message for language detection.Protobuf type
google.cloud.translation.v3.DetectLanguageRequest
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
protected MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public DetectLanguageRequest build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public DetectLanguageRequest buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public DetectLanguageRequest.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest.Builder mergeFrom(DetectLanguageRequest other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public DetectLanguageRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<DetectLanguageRequest.Builder>
IOException
public DetectLanguageRequest.SourceCase getSourceCase()
getSourceCase
in interface DetectLanguageRequestOrBuilder
public 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 DetectLanguageRequestOrBuilder
public 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 DetectLanguageRequestOrBuilder
public 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(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 DetectLanguageRequestOrBuilder
public 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 DetectLanguageRequestOrBuilder
public 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(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 DetectLanguageRequestOrBuilder
public String getContent()
The content of the input stored as a string.
string content = 1;
getContent
in interface DetectLanguageRequestOrBuilder
public ByteString getContentBytes()
The content of the input stored as a string.
string content = 1;
getContentBytes
in interface DetectLanguageRequestOrBuilder
public 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(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 DetectLanguageRequestOrBuilder
public 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 DetectLanguageRequestOrBuilder
public 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(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()
DetectLanguageRequestOrBuilder
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];
getLabelsCount
in interface DetectLanguageRequestOrBuilder
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/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 DetectLanguageRequestOrBuilder
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/advanced/labels for more information.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
getLabelsMap
in interface DetectLanguageRequestOrBuilder
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/advanced/labels for more information.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
getLabelsOrDefault
in interface DetectLanguageRequestOrBuilder
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/advanced/labels for more information.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
getLabelsOrThrow
in interface DetectLanguageRequestOrBuilder
public 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(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
public final DetectLanguageRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
Copyright © 2022 Google LLC. All rights reserved.