Class TextAnnotation.DetectedLanguage.Builder (3.78.0)

publicstaticfinalclass TextAnnotation.DetectedLanguage.BuilderextendsGeneratedMessageV3.Builder<TextAnnotation.DetectedLanguage.Builder>implementsTextAnnotation.DetectedLanguageOrBuilder

Detected language for a structural component.

Protobuf type google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicTextAnnotation.DetectedLanguage.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

build()

publicTextAnnotation.DetectedLanguagebuild()
Returns
Type Description
TextAnnotation.DetectedLanguage

buildPartial()

publicTextAnnotation.DetectedLanguagebuildPartial()
Returns
Type Description
TextAnnotation.DetectedLanguage

clear()

publicTextAnnotation.DetectedLanguage.Builderclear()
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

clearConfidence()

publicTextAnnotation.DetectedLanguage.BuilderclearConfidence()

Confidence of detected language. Range [0, 1].

float confidence = 2;

Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicTextAnnotation.DetectedLanguage.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

clearLanguageCode()

publicTextAnnotation.DetectedLanguage.BuilderclearLanguageCode()

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

string language_code = 1;

Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicTextAnnotation.DetectedLanguage.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

clone()

publicTextAnnotation.DetectedLanguage.Builderclone()
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

getConfidence()

publicfloatgetConfidence()

Confidence of detected language. Range [0, 1].

float confidence = 2;

Returns
Type Description
float

The confidence.

getDefaultInstanceForType()

publicTextAnnotation.DetectedLanguagegetDefaultInstanceForType()
Returns
Type Description
TextAnnotation.DetectedLanguage

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLanguageCode()

publicStringgetLanguageCode()

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

string language_code = 1;

Returns
Type Description
String

The languageCode.

getLanguageCodeBytes()

publicByteStringgetLanguageCodeBytes()

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

string language_code = 1;

Returns
Type Description
ByteString

The bytes for languageCode.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TextAnnotation.DetectedLanguage other)

publicTextAnnotation.DetectedLanguage.BuildermergeFrom(TextAnnotation.DetectedLanguageother)
Parameter
Name Description
other TextAnnotation.DetectedLanguage
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicTextAnnotation.DetectedLanguage.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicTextAnnotation.DetectedLanguage.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalTextAnnotation.DetectedLanguage.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

setConfidence(float value)

publicTextAnnotation.DetectedLanguage.BuildersetConfidence(floatvalue)

Confidence of detected language. Range [0, 1].

float confidence = 2;

Parameter
Name Description
value float

The confidence to set.

Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicTextAnnotation.DetectedLanguage.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

setLanguageCode(String value)

publicTextAnnotation.DetectedLanguage.BuildersetLanguageCode(Stringvalue)

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

string language_code = 1;

Parameter
Name Description
value String

The languageCode to set.

Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

This builder for chaining.

setLanguageCodeBytes(ByteString value)

publicTextAnnotation.DetectedLanguage.BuildersetLanguageCodeBytes(ByteStringvalue)

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

string language_code = 1;

Parameter
Name Description
value ByteString

The bytes for languageCode to set.

Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicTextAnnotation.DetectedLanguage.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalTextAnnotation.DetectedLanguage.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.