Class TextAnnotation.DetectedLanguage (3.16.0)

publicstaticfinalclass TextAnnotation.DetectedLanguageextendsGeneratedMessageV3implementsTextAnnotation.DetectedLanguageOrBuilder

Detected language for a structural component.

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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > TextAnnotation.DetectedLanguage

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)

Static Fields

CONFIDENCE_FIELD_NUMBER

publicstaticfinalintCONFIDENCE_FIELD_NUMBER
Field Value
Type Description
int

LANGUAGE_CODE_FIELD_NUMBER

publicstaticfinalintLANGUAGE_CODE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticTextAnnotation.DetectedLanguagegetDefaultInstance()
Returns
Type Description
TextAnnotation.DetectedLanguage

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticTextAnnotation.DetectedLanguage.BuildernewBuilder()
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

newBuilder(TextAnnotation.DetectedLanguage prototype)

publicstaticTextAnnotation.DetectedLanguage.BuildernewBuilder(TextAnnotation.DetectedLanguageprototype)
Parameter
Name Description
prototype TextAnnotation.DetectedLanguage
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

parseDelimitedFrom(InputStream input)

publicstaticTextAnnotation.DetectedLanguageparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTextAnnotation.DetectedLanguageparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticTextAnnotation.DetectedLanguageparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticTextAnnotation.DetectedLanguageparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticTextAnnotation.DetectedLanguageparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticTextAnnotation.DetectedLanguageparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticTextAnnotation.DetectedLanguageparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTextAnnotation.DetectedLanguageparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticTextAnnotation.DetectedLanguageparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTextAnnotation.DetectedLanguageparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticTextAnnotation.DetectedLanguageparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticTextAnnotation.DetectedLanguageparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextAnnotation.DetectedLanguage
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<TextAnnotation.DetectedLanguage>parser()
Returns
Type Description
Parser<DetectedLanguage>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

getParserForType()

publicParser<TextAnnotation.DetectedLanguage>getParserForType()
Returns
Type Description
Parser<DetectedLanguage>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicTextAnnotation.DetectedLanguage.BuildernewBuilderForType()
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedTextAnnotation.DetectedLanguage.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicTextAnnotation.DetectedLanguage.BuildertoBuilder()
Returns
Type Description
TextAnnotation.DetectedLanguage.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.