Class ClassifyTextResponse.Builder (2.73.0)

publicstaticfinalclass ClassifyTextResponse.BuilderextendsGeneratedMessageV3.Builder<ClassifyTextResponse.Builder>implementsClassifyTextResponseOrBuilder

The document classification response message.

Protobuf type google.cloud.language.v2.ClassifyTextResponse

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

addAllCategories(Iterable<? extends ClassificationCategory> values)

publicClassifyTextResponse.BuilderaddAllCategories(Iterable<?extendsClassificationCategory>values)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.language.v2.ClassificationCategory>
Returns
Type Description
ClassifyTextResponse.Builder

addCategories(ClassificationCategory value)

publicClassifyTextResponse.BuilderaddCategories(ClassificationCategoryvalue)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameter
Name Description
value ClassificationCategory
Returns
Type Description
ClassifyTextResponse.Builder

addCategories(ClassificationCategory.Builder builderForValue)

publicClassifyTextResponse.BuilderaddCategories(ClassificationCategory.BuilderbuilderForValue)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameter
Name Description
builderForValue ClassificationCategory.Builder
Returns
Type Description
ClassifyTextResponse.Builder

addCategories(int index, ClassificationCategory value)

publicClassifyTextResponse.BuilderaddCategories(intindex,ClassificationCategoryvalue)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameters
Name Description
index int
value ClassificationCategory
Returns
Type Description
ClassifyTextResponse.Builder

addCategories(int index, ClassificationCategory.Builder builderForValue)

publicClassifyTextResponse.BuilderaddCategories(intindex,ClassificationCategory.BuilderbuilderForValue)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameters
Name Description
index int
builderForValue ClassificationCategory.Builder
Returns
Type Description
ClassifyTextResponse.Builder

addCategoriesBuilder()

publicClassificationCategory.BuilderaddCategoriesBuilder()

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Returns
Type Description
ClassificationCategory.Builder

addCategoriesBuilder(int index)

publicClassificationCategory.BuilderaddCategoriesBuilder(intindex)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategory.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicClassifyTextResponse.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ClassifyTextResponse.Builder
Overrides

build()

publicClassifyTextResponsebuild()
Returns
Type Description
ClassifyTextResponse

buildPartial()

publicClassifyTextResponsebuildPartial()
Returns
Type Description
ClassifyTextResponse

clear()

publicClassifyTextResponse.Builderclear()
Returns
Type Description
ClassifyTextResponse.Builder
Overrides

clearCategories()

publicClassifyTextResponse.BuilderclearCategories()

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Returns
Type Description
ClassifyTextResponse.Builder

clearField(Descriptors.FieldDescriptor field)

publicClassifyTextResponse.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ClassifyTextResponse.Builder
Overrides

clearLanguageCode()

publicClassifyTextResponse.BuilderclearLanguageCode()

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language][] field for more details.

string language_code = 2;

Returns
Type Description
ClassifyTextResponse.Builder

This builder for chaining.

clearLanguageSupported()

publicClassifyTextResponse.BuilderclearLanguageSupported()

Whether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.

bool language_supported = 3;

Returns
Type Description
ClassifyTextResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicClassifyTextResponse.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ClassifyTextResponse.Builder
Overrides

clone()

publicClassifyTextResponse.Builderclone()
Returns
Type Description
ClassifyTextResponse.Builder
Overrides

getCategories(int index)

publicClassificationCategorygetCategories(intindex)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategory

getCategoriesBuilder(int index)

publicClassificationCategory.BuildergetCategoriesBuilder(intindex)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategory.Builder

getCategoriesBuilderList()

publicList<ClassificationCategory.Builder>getCategoriesBuilderList()

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Returns
Type Description
List<Builder>

getCategoriesCount()

publicintgetCategoriesCount()

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Returns
Type Description
int

getCategoriesList()

publicList<ClassificationCategory>getCategoriesList()

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Returns
Type Description
List<ClassificationCategory>

getCategoriesOrBuilder(int index)

publicClassificationCategoryOrBuildergetCategoriesOrBuilder(intindex)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameter
Name Description
index int
Returns
Type Description
ClassificationCategoryOrBuilder

getCategoriesOrBuilderList()

publicList<?extendsClassificationCategoryOrBuilder>getCategoriesOrBuilderList()

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Returns
Type Description
List<? extends com.google.cloud.language.v2.ClassificationCategoryOrBuilder>

getDefaultInstanceForType()

publicClassifyTextResponsegetDefaultInstanceForType()
Returns
Type Description
ClassifyTextResponse

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLanguageCode()

publicStringgetLanguageCode()

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language][] field for more details.

string language_code = 2;

Returns
Type Description
String

The languageCode.

getLanguageCodeBytes()

publicByteStringgetLanguageCodeBytes()

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language][] field for more details.

string language_code = 2;

Returns
Type Description
ByteString

The bytes for languageCode.

getLanguageSupported()

publicbooleangetLanguageSupported()

Whether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.

bool language_supported = 3;

Returns
Type Description
boolean

The languageSupported.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ClassifyTextResponse other)

publicClassifyTextResponse.BuildermergeFrom(ClassifyTextResponseother)
Parameter
Name Description
other ClassifyTextResponse
Returns
Type Description
ClassifyTextResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

publicClassifyTextResponse.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
ClassifyTextResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalClassifyTextResponse.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ClassifyTextResponse.Builder
Overrides

removeCategories(int index)

publicClassifyTextResponse.BuilderremoveCategories(intindex)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameter
Name Description
index int
Returns
Type Description
ClassifyTextResponse.Builder

setCategories(int index, ClassificationCategory value)

publicClassifyTextResponse.BuildersetCategories(intindex,ClassificationCategoryvalue)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameters
Name Description
index int
value ClassificationCategory
Returns
Type Description
ClassifyTextResponse.Builder

setCategories(int index, ClassificationCategory.Builder builderForValue)

publicClassifyTextResponse.BuildersetCategories(intindex,ClassificationCategory.BuilderbuilderForValue)

Categories representing the input document.

repeated .google.cloud.language.v2.ClassificationCategory categories = 1;

Parameters
Name Description
index int
builderForValue ClassificationCategory.Builder
Returns
Type Description
ClassifyTextResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

publicClassifyTextResponse.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ClassifyTextResponse.Builder
Overrides

setLanguageCode(String value)

publicClassifyTextResponse.BuildersetLanguageCode(Stringvalue)

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language][] field for more details.

string language_code = 2;

Parameter
Name Description
value String

The languageCode to set.

Returns
Type Description
ClassifyTextResponse.Builder

This builder for chaining.

setLanguageCodeBytes(ByteString value)

publicClassifyTextResponse.BuildersetLanguageCodeBytes(ByteStringvalue)

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language][] field for more details.

string language_code = 2;

Parameter
Name Description
value ByteString

The bytes for languageCode to set.

Returns
Type Description
ClassifyTextResponse.Builder

This builder for chaining.

setLanguageSupported(boolean value)

publicClassifyTextResponse.BuildersetLanguageSupported(booleanvalue)

Whether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.

bool language_supported = 3;

Parameter
Name Description
value boolean

The languageSupported to set.

Returns
Type Description
ClassifyTextResponse.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalClassifyTextResponse.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ClassifyTextResponse.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年10月30日 UTC.